vendredi 9 janvier 2015

MySql and PHP Drop Down + Inputting

Thanks for taking the time to look at this. Is there a way I can make a drop down using HTML being filled with titles (Mr, Mrs, Miss etc) and when sent in a form, gets imputed into a title field in my database?


This leads me onto my next issue I am having, is there a way I can get a check box, again created in HTML and when clicked it simply says "Yes" in the cell it's being displayed in? The current code I am using for this is:


$laptop = "No"; foreach($_POST['laptop'] as $list) { if($list != null) { $laptop = "Yes"; } }


In addition to this, when the check box is being displayed on the edit page, is there a way where it can be pre-filled based of the entry from the database? Same with text box if possible.


Thanks everyone, Simon





Aucun commentaire:

Enregistrer un commentaire