Jump to content

radio array trouble


xxreenaxx1

Recommended Posts

Why wont my radio array show the value that was selected. If a user select a radio then the value should be printed. But it should print the question id then the choice that was chosen for that question id.

 

<?php 

$gender = $_POST["choice"];
$que_ID = $_POST["Que_ID"];

foreach ($gender as $key => $value) {
   echo $key." - ".$value."";}
?>

 

$intNum = 1;
$intnumber = 1;


while( $info = mysql_fetch_array( $sqll )){  
  echo "<input type='hidden' name=\"Que_ID\" value=\"{$info['Que_ID']}\" /> ";
  echo " $intNum, {$info['Que_Question']} <br />\n"; 
   $intNum++;

for ($i =1; $i < 5; $i++) {  

echo "<input type=\"Radio\" name=\"choice[{$info['Que_ID']}][]\" />{$info['Que_Choice'.$i]}<br />\n";  
  $intnumber++;

Link to comment
https://forums.phpfreaks.com/topic/229868-radio-array-trouble/
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.