Help with PHP forms

I finally got my registration and login pages to work but they only have a user name and password to submit. I was wondering if it is possible to add a drop down menu and radio boxes to submit more? If so, could someone redirect me to a script/tutorial or tell me how?


Google is your friend :)
Just search HTML Select and HTML radio Button.
Here is the first hit I found for radio button

Oh, sorry I wasn’t more specific, I know how to do radio buttons and drop down menus but I can’t find a good php tutorial that teaches me how to send it to my database when submitted. Thanks for the help though.

When you submit your form to the “Action” page, all the variables in that form become available (either through the $_GET or $_POST superglobal arrays).

In the “ACTION” page you just create your query/logic based upon the submitted data.



If ($_POST['Radio1'] == 'Some Value') {
    $query = "INSERT INTO table (id, data1, data2, ..... dataN) 
                   VALUES(1, '".$data1.'", '".$data2.'", .....'".$dataN.'";
} else {
    $query = "UPDATE table SET data1 = '".$data1"' WHERE id = 1";

Thanks very much. :)

Sponsor our Newsletter | Privacy Policy | Terms of Service