Jump to content

Get Radio Button value using php $_GET


madzmar25

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.