Minimeallolla Posted November 12, 2010 Share Posted November 12, 2010 what would be the $_POST variable name for a radio button option? Quote Link to comment Share on other sites More sharing options...
Rifts Posted November 12, 2010 Share Posted November 12, 2010 it would be whatever you set it as... <form> <input type="radio" name="sex" value="male" /> Male<br /> <input type="radio" name="sex" value="female" /> Female </form> $_POST['sex'] Quote Link to comment Share on other sites More sharing options...
Minimeallolla Posted November 12, 2010 Author Share Posted November 12, 2010 ops i meant a drop down menu* Quote Link to comment Share on other sites More sharing options...
Dragosvr92 Posted November 12, 2010 Share Posted November 12, 2010 Any..... the Variables are what you want them to be you can name the Variable Radio,R,Rad ........dosnt matter Quote Link to comment Share on other sites More sharing options...
Minimeallolla Posted November 12, 2010 Author Share Posted November 12, 2010 well i did Bithrdate Day:<name="day" value="day"/> and tried to call on that varaible with $day and it doesnt work Quote Link to comment Share on other sites More sharing options...
Rifts Posted November 12, 2010 Share Posted November 12, 2010 its the same <form action=""> <select name="CARS"> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option value="fiat">Fiat</option> <option value="audi">Audi</option> </select> </form> $_POST['CARS'] Quote Link to comment Share on other sites More sharing options...
Rifts Posted November 12, 2010 Share Posted November 12, 2010 this might help you also http://www.w3schools.com/html/html_forms.asp Quote Link to comment Share on other sites More sharing options...
Minimeallolla Posted November 12, 2010 Author Share Posted November 12, 2010 I did <select> instead of <select name>. Thanks for the help. (: Can you help me with another thread? http://www.phpfreaks.com/forums/php-coding-help/need-help-with-syntax-php-username-need-help/ Quote Link to comment Share on other sites More sharing options...
Dragosvr92 Posted November 12, 2010 Share Posted November 12, 2010 if you want to use the $day variable you have to enable register_globals on PHP but i'd recommend you to use $_GET[''day] or $_POST['day'] in case your server dosnt have that function enabled Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted November 12, 2010 Share Posted November 12, 2010 Don't turn on register_globals. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.