Posted by Harold on 07/07/06 20:12
i still can not get the checkboxes to write to the database
i have a table called skills with the following fields - skillid, fl_user
This is how i have tyhe checkbox option written
<td><input type="checkbox" name="skill[]" value="16">
Delphi</td>
This code always comes up with the error message
foreach ($_POST['skill'] as $skill) {
mysql_query("INSERT INTO skills (skillid ,fl_user) " .
"VALUES ($skill, userid)");
$result = mysql_query($query) or die('Could not execute INSERT
query');
}
What am i doing wrong??
Navigation:
[Reply to this message]
|