PDA

View Full Version : checkbox problems..need help



syazyan
12-06-2006, 12:07 PM
hello there,

i have a problem about a checkbox..i need to store the data from these checkbox..i have 6-7 checkbox..so how can i save the data from the checkbox to the database??..and how can i update the checkbox?? i really don'y know...:( :confused:

this is sample of my checkbox..



<input name="type[]" type="checkbox" id="type[]" value="Warehouse Licence"></td>

<input name="type[]" type="checkbox" id="type[]" value="Manufacturing Warehouse Licence">

<input name="type[]" type="checkbox" id="type[]" value="Duty Free Shop Licence">

<input name="type[]" type="checkbox" id="type[]" value="Inland Clearance Depot Licence"></td>


can someone help me towards this??

mwinter
12-10-2006, 02:01 AM
i need to store the data from these checkbox..i have 6-7 checkbox..so how can i save the data from the checkbox to the database??

Obtain the values from either the $_GET or $_POST superglobals (depending on the method used to submit the form), and use those values in a query.



..and how can i update the checkbox??

What's that supposed to mean?



<input name="type[]" type="checkbox" id="type[]" value="Warehouse Licence">

The mark-up you posted is invalid: id attribute values cannot contain square brackets, and values must be unique.

The name and id attribute values of form controls don't need to be the same. In fact, one usually doesn't need id attributes on form controls at all.

Mike

syazyan
12-14-2006, 01:52 AM
tq for ur explanation mwinter...i have solved my problem..:) ;)