html - Radio Buttons to PHP-MySQL -


how can value of radio button "gender selector" (male/female) php? need register.php form. tried googling didnt provide how value of how generate it.

code

<form action = "register.php" method = "post"> <input type="radio" name="sex" value="male">male<br> <input type="radio" name="sex" value="female">female </form> 

php:

$sex = $_post['radiobutton=sex']; 

on page form:

<form action='register.php' method='post'>     <input type='radio' name='sex' value='male'/>male     <input type='radio' name='sex' value='female'/>female     <input type='submit' name='submit_sex' /> </form> 

on register.php:

<?php  if (isset($_post['submit_sex']))     echo 'gender ' . $_post['sex'];  ?> 

Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -