I have a little problem.. i am working on a carsite. On this site i need to connect a car to certain options. For instance: when i click on "Edit Opel" there needs to be an checkbox list with all the options on the opel checked already (from db). When i uncheck an option it needs to be disconnected from the car..
I have the list like this:
<label for="opties">
<p>Opties</p>
<fieldset>
<legend>Auto</legend>
<label for="list1">
<input type="checkbox" name="optie_group[]" value="value1" />ABS</br>
<input type="checkbox" name="optie_group[]" value="value2" />airbags</br>
<input type="checkbox" name="optie_group[]" value="value3" />bekleding leder</br>
<input type="checkbox" name="optie_group[]" value="value4" />bordcomputer</br>
<input type="checkbox" name="optie_group[]" value="value5" />centrale vergrendeling</br>
<input type="checkbox" name="optie_group[]" value="value6" />climate control</br>
<input type="checkbox" name="optie_group[]" value="value7" />airconditioning</br>
<input type="checkbox" name="optie_group[]" value="value8" />cruise control</br>
<input type="checkbox" name="optie_group[]" value="value9" />electrische ramen</br>
<input type="checkbox" name="optie_group[]" value="value10" />ESP</br>
</label>
</fieldset>
<fieldset>
<legend>opties</legend>
<label for="list2">
<input type="checkbox" name="optie_group[]" value="value11" />isofix</br>
<input type="checkbox" name="optie_group[]" value="value12" />lichtmetalen velgen</br>
<input type="checkbox" name="optie_group[]" value="value13" />metallic lak</br>
<input type="checkbox" name="optie_group[]" value="value14" />navigatiesysteem</br>
<input type="checkbox" name="optie_group[]" value="value15" />panorama dak</br>
<input type="checkbox" name="optie_group[]" value="value16" />parkeersensoren</br>
<input type="checkbox" name="optie_group[]" value="value17" />sportstoelen</br>
<input type="checkbox" name="optie_group[]" value="value18" />stoelverwarming</br>
<input type="checkbox" name="optie_group[]" value="value19" />trekhaak</br>
<input type="checkbox" name="optie_group[]" value="value20" />elektrische spiegels</br>
</label>
</fieldset>
<fieldset>
<legend>-</legend>
<label for="list3">
<input type="checkbox" name="optie_group[]" value="value21" />elektrische stoelen</br>
<input type="checkbox" name="optie_group[]" value="value22" />lichtsensor</br>
<input type="checkbox" name="optie_group[]" value="value23" />regensensor</br>
<input type="checkbox" name="optie_group[]" value="value24" />AUX aansluiting</br>
<input type="checkbox" name="optie_group[]" value="value25" />bluetooth</br>
<input type="checkbox" name="optie_group[]" value="value26" />achteruitrij camera</br>
<input type="checkbox" name="optie_group[]" value="value27" />parkeer piloot</br>
<input type="checkbox" name="optie_group[]" value="value28" />stuurbekrachtiging</br>
<input type="checkbox" name="optie_group[]" value="value29" />halfleren bekleding</br>
</label>
</fieldset>
</label>
I've tried it with an
if ($_post["submit"]=="save") { //connect to db & insert into db but this did not work for me }
I'm fairly new to PHP and don't know how to set this up.. hope you can help me!
Aucun commentaire:
Enregistrer un commentaire