Ok I have seen and understand how to make a checkbox sticky from a "Post" point of view. My question is. I use a query from a database table to fill in all the info someone previously updated. I have figured out how to fil text areas, text boxes and even drop down's. But for the life of me I can not figure out the checkboxes.
I use a session varible to pull a query based on $_Session['username'] the query works perfectly.
<?php
session_start();
include_once 'header.inc';
include_once 'check_status.inc';
include_once 'db.php';
$username = $_SESSION['username'];
$userlevel = $_SESSION['userlevel'];
$membertype = $_SESSION['membertype'];
$profilelist=mysql_query(
"SELECT * FROM profileone WHERE usernm='$_SESSION[username]'");
while ($prof = mysql_fetch_array($profilelist)) {
$profileid = $prof['profileid'];
$userlvl = $prof['userlvl'];
$usernm = $prof['usernm'];
$birthmonth = $prof['birthmonth'];
$birthday = $prof['birthday'];
$birthyear = $prof['birthyear'];
$height = $prof['height'];
$weight = $prof['weight'];
$bodymark = $prof['bodymark'];
}
//truncated: as this is a huge page
?>
Then I go in and out of PHP to fill in info to the various fields, so that the users current information is pulled from the database and automaticaly entered into each field so they only have to change the things they want to.
Please enter your birthday:</font></b></td>
<td width="74%" valign="bottom"><b>
<select size="1" name="birthmonth">
<option value="<?php echo $birthmonth ?>"selected><?php echo $birthmonth ?></option>
<option value="January">January</option>
<option value="February">February</option>
<option value="March">March</option>
<option value="April">April</option>
<option value="May">May</option>
<option value="June">June</option>
<option value="July">July</option>
<option value="August">August</option>
<option value="September">September</option>
<option value="October">October</option>
<option value="November">November</option>
<option value="December">December</option>
</select><font size="2">
This method is simple and works well for me as I develop this small site.
MY QUESTION: How do I jump into PHP and make the checkboxes work?
One note though... When the form is processed after submission I store all of the checkboxes (array) into one field in the database using the "Implode" function...
/*
From the processing code, not part of this from (just for reference)
$String1 = implode(", ", $_POST['bodymark']);
*/
How would I make the following sticky (if that's possible after storing them with implode)?
<input type="checkbox" name="bodymark[]" value="Ear Piercings">Ear
Piercing(s)<br>
<input type="checkbox" name="bodymark[]" value="Nose Piercings">Nose
Piercing(s)<br>
<input type="checkbox" name="bodymark[]" value="Nipple Piercings">Nipple
Piercing(s)
<input type="checkbox" name="bodymark[]" value="Other Piercings">Other
Piercing(s)<br>
<input type="checkbox" name="bodymark[]" value="Tattoos">Tattoos<br>