1: 2: 3: 4: 5: 6: 7: 8: 9:
for ( $counter = 1; $counter <= 50; $counter++) { if ($_POST['ob'.$counter]>'') { $ob=$_POST['ob'.$counter]; mysql_query("INSERT INTO squestions(obno, ucode) VALUES ('$ob','$testcode')"); } }