saradrungta Posted November 25, 2008 Share Posted November 25, 2008 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 More sharing options...
revraz Posted November 25, 2008 Share Posted November 25, 2008 What is the error saying that is not defined? Link to comment https://forums.phpfreaks.com/topic/134212-error-in-form/#findComment-698605 Share on other sites More sharing options...
saradrungta Posted November 25, 2008 Author Share Posted November 25, 2008 alert message box appear with text "undefined" Link to comment https://forums.phpfreaks.com/topic/134212-error-in-form/#findComment-698609 Share on other sites More sharing options...
revraz Posted November 25, 2008 Share Posted November 25, 2008 Could be a javascript error, PHP wouldn't do that. Link to comment https://forums.phpfreaks.com/topic/134212-error-in-form/#findComment-698614 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.