Jump to content

how to display selected radio button from Mysql data?


Darkwoods

Recommended Posts

Dude,

 

Try with this

 

<form name="test" action="submit.php" method="post">

<?php

$selected = 1; // it will be queried value

if($selected == 1){

echo '<INPUT TYPE=RADIO NAME="size" VALUE="1" CHECKED >one<BR>

      <INPUT TYPE=RADIO NAME="size" VALUE="2">two<BR>';

}

else{

echo '<INPUT TYPE=RADIO NAME="size" VALUE="1">one<BR>

      <INPUT TYPE=RADIO NAME="size" VALUE="2" CHECKED >two<BR>';

}

?>

 

</form>

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.