Hi again, trust you are all well.
My query is about holding the check / uncheck value for a checkbox for the assignment.
Below is an extract from the tutorial example:-
Language: PHP
if (isset($_POST[';Submit1';])) {
if (isset($_POST[';ch1';])) {
$ch1 = $_POST[';ch1';];
if ($ch1 = = ';net';) {
$ch1 = ';checked';;
}
}
My code looks like the following:-
Language: PHP
$SQL="SELECT * FROM course";
$result=mysql_query($SQL);
while($db_field=mysql_fetch_assoc($result)){
if (isset($_POST[';ch';.$db_field[';cid';]])){
$check_course[$db_field[';cid';]] = ';checked';;
}
}
The isset() lines of code ito the checkbox refer to my query. Essentially I can't read in the value. Get an undefined index error. Maybe someone can see the obvious mistake. I hope so.
Alternatively does anyone have a few suggestions / tips when using checkboxes.
Thanks in advance.
Ian