The database may give me rdid = 4, 8, 24. I use this to create radio buttons.
Code: Select all
$name=sc4; <INPUT Type='Radio' Name='$name'>I submit this to the next page and I want to get the value of these variables. I know rdid = 4, 8, 24 but I do not know how to get this variable. I have tried this but I am missing something.
Code: Select all
$query3 = "SELECT * FROM table where rid LIKE '$rid'";
$result3 = mysql_query($query3) or die(mysql_error());
while($rdid = mysql_fetch_array($result3)){
$sc="sc" . $rdid['rdid'];
$score=$_POST['sc'];
echo "$sc - $score<br>";
}