Jump to content

error in form


saradrungta

Recommended Posts

when i execute below code it alerts "undefined" pls suggest a solution

 

 

echo"<form name=test onsubmit=alert(test.ch.value)>";

echo "<table border=15>";

$count=0;

while($count<1){

$qid=unic(1,14);

$q="Select * from quesans where QID=$qid";

$x=MySql_query($q) or die("record not selected");

 

while($a=Mysql_fetch_row($x)){

echo"<tr><td colspan=2>".$a[1]."</td></tr>

<tr><td><input type=radio name=ch value=c1></td><td>".htmlentities($a[2])."</td></tr>

<tr><td><input type=radio name=ch value=c2></td><td>".htmlentities($a[3])."</td></tr>

<tr><td><input type=radio name=ch value=c3></td><td>".htmlentities($a[4])."</td></tr>

<tr><td><input type=radio name=ch value=c4></td><td>".htmlentities($a[5])."</td></tr>";

}

echo"<tr><td colspan=2><center><input type=submit value=Submit></center></td></tr>";

$count++;

}

echo"</table>";

echo"</form>";

Link to comment
https://forums.phpfreaks.com/topic/134212-error-in-form/
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.