I am making a form where i need the user to select one of two radio buttons, enter some text fields and select info from a drop down box. I know how to put the text fields into a database, but im not sure how to put in the radio button value, and the drop-down box value.
The below code is what i have to add the text fields.
Any help is greatly appreciated. THanks.Code:<?php if ($HTTP_POST_VARS['submit']) { mysql_connect("freshsql.com:","",""); mysql_select_db(""); $entrytitle=$HTTP_POST_VARS['entrytitle']; $entrytext=$HTTP_POST_VARS['entrytext']; $entrytime=$HTTP_POST_VARS['entrytime']; $query ="INSERT INTO weblog (entrytitle,entrytext,entrytime)"; $query.=" VALUES ('$entrytitle','$entrytext', '$entrytime')"; $result=mysql_query($query); if ($result) echo "<b>Successfully Posted!</b>"; else echo"ERROR"; } ?> <p><a href="index.php">Click Here to View</a></p>



Reply With Quote
Bookmarks