php - Radio button $_POST -


how know value of clicked button

<input type="radio" name="radio">yes<br> <input type="radio" name="radio">no 

php part

$option1= $_post['radio']; 

when echo it say's "on".

you need give value attribute:

<input type="radio" name="radio" value="yes">yes<br> <input type="radio" name="radio" value="no">no 

Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -