here is the code probably something simple I hope see what you think
Code: Select all
//DATA BASE CONNECT
mysql_select_db($database_unknown, $unknown);
$query_rs_add_students = "SELECT * FROM student_accounts";
$rs_add_students = mysql_query($query_rs_add_students, $unknown) or die(mysql_error());
$row_rs_add_students = mysql_fetch_assoc($rs_add_students);
$totalRows_rs_add_students = mysql_num_rows($rs_add_students);
for($i=1;$i<17;$i++)
{
if ($first_name[$i] != "")
{
$insertSQL = "INSERT INTO student_accounts (first_name, last_name, user_name, password) VALUES ('$first_name[$i]','$last_name[$i]','$final_username[$i]','$sin_4[$i]')";
}
}
mysql_select_db($database_unknown, $unknown);
$Result1 = mysql_query($insertSQL, $unknown) or die(mysql_error());