madzmar25 Posted April 23, 2011 Share Posted April 23, 2011 i would like to display the value of the selected radio button on the same page... what i want is just reload the page and if there is a radio button selected displays it but i cant display it <?PHP if (isset($_GET["submit"])) { echo $_GET["myradio"]; } ?> <html> <head> </head> <body> <form action="<?PHP $_SERVER["PHP_SELF"]; ?>" method="get"> One <input type="radio" name="myradio" value="one"> Two <input type="radio" name="myradio" value="two"> <a href="<?PHP $_SERVER["PHP_SELF"]; ?>" name="submit">test </a> </form> </body> </html> please help guys...thanks Link to comment https://forums.phpfreaks.com/topic/234493-get-radio-button-value-using-php-_get/ Share on other sites More sharing options...
lastkarrde Posted April 23, 2011 Share Posted April 23, 2011 You need to have a button to submit your form. An anchor will not do it. <input type="submit" name="submit" value="Test"> Link to comment https://forums.phpfreaks.com/topic/234493-get-radio-button-value-using-php-_get/#findComment-1205162 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.