Re: Checkboxes
| From: | Torsten Roehr | Date: | Tue, 27 Apr 2004 14:54:01 +0000 |
| Subject: | Re: Checkboxes | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-184762@lists.php.net to get a copy of this message | ||
Do a print_r($_POST); at the top of your processing script to see which
checkbox values are available. This should help you find the way.
Regards, Torsten
"Phpu" <phpu@go.ro> wrote in message
news:000001c42c58$6cd2b930$5600a8c0@fannehh...
I have this script:
Each brand has more that one model. When i chose a brand it displays
chackboxes for each model in a form..
Now i want to select some models and introduce them into database.
How can i do that. This script display the each model, but wen i chose some
of them the form doesn't work. .
<FORM METHOD=POST ACTION="add_prodrel.php"
enctype="multipart/form-data" NAME="doublecombo">
<?
$query12 = "SELECT id, brand_id, model_id FROM shop_items WHERE
id='$showdetail'";
$result12 = mysql_query($query12) or die("error in query - $query12 -
".mysql_error());
while($row = mysql_fetch_row($result12)) {
list($id, $brand_id, $model_id) = $row;
$query3 = "SELECT id, brand_id, name FROM
shop_models WHERE brand_id='$brand_id'";
$result3 = mysql_query($query3) or die("error in
query - $query3 - ".mysql_error());
while($row = mysql_fetch_row($result3)) {
list($id, $brand_id, $name) = $row;
echo " <input
type='checkbox' name='".$name."'
value='".$id."'> $name<br>";
}
}
?>
<INPUT TYPE="hidden" name="add" value="set"><INPUT
TYPE="submit"
name="submit" value="Ajouter">
</form>