I found your biggest problem in the code, look below:
troublemaker wrote:
Ok,
I have tried to use PHP3 to pre-fill check boxes based on what I have in the database field...
Eg. if the variable $attend has the value of "yes", (ie the checkbox is checked) when the user hits submit I succesfully use the input as follows:
<input type="checkbox" name="attend" value="yes"<?php if ($attend == "yes") {
echo "checked";}?>>
// you didn't leave a space between
// "value="yes"" and "checked" so the code
// must be either "value="yes" <?ph..." or
// "echo " checked";}..."
// hope that makes sense. That would cause
// the browser not to recognize the
// "checked" attribute.
then I want to echo the checkbox value using the same form on the submitted page,,, before I display, I use the code below to make sure $attend has a value;
if ($attend != "yes") {
$attend = "no";
}
To echo the checkbox I use something like the following that is buried in the echoed section of the form;
<input type=\"checkbox\" name=\"attend\" value = $attend if ($attend == \"yes\") {echo checked\;}>
Any ideas?