Thanks, that creates the form with 10 lines of input, but what is the insert code like to get all of that data into the MySQL database. As is it only takes the last row of input. I'd like for it to upload all rows in order.
Thanks.
Here's the code I have:
<?php
if (!erefno || !$pl || !$div || !$first || !$last || !$rd1)
{ ?>
You have not entered all the required details.<br>
Please go back and try again.
<?php exit;
}
$erefno = addslashes($erefno);
$pl = addslashes($pl);
$div = addslashes($div);
$first = addslashes($first);
$last = addslashes($last);
$pdgan = addslashes($pdgan);
$rd1 = addslashes($rd1);
$rd2 = addslashes($rd2);
$rd3 = addslashes($rd3);
$rd4 = addslashes($rd4);
$fnl9 = addslashes($fnl9);
$prize = addslashes($prize);
$madcn = addslashes($madcn);
@ $db = mysql_pconnect("**.com", "pw", "***db");
if (!$db) { echo "Error: Could not connect to database. Please try again later.";
exit;
}
mysql_select_db("thedb");
$query = "insert into resultdb values
('".$erefno ."', '".$pl."', '".$div."', '".$first."', '".$last."', '".$pdgan."', '".$rd1."', '".$rd2."', '".$rd3."', '".$rd4."', '".$fnl9."', '".$prize."', '".$madcn."')";
$result = mysql_query($query);
if ($result) {
echo mysql_affected_rows(). "Record has been added. This record has been inserted into database.
<br><br>If you do not see this record posted in the results section please email the MADC Web Master.";
}
else
{
echo"Record not entered.";
}
?>
Do I loop this the same way?