Print your query and execute it in mysql console/phpmyadmin.. Also show us the query ..
nav33n
Purple hazed!
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
$sql="INSERT INTO guests (guest_name, guest_email) VALUES";
for($i=0;$i<sizeof($_POST['username']);$i++){
$sql.="('".mysql_real_escape_string($_POST['username'][$i])."','".mysql_real_escape_string($_POST['email'][$i])."')";
if(!$i==sizeof($_POST['username'])){
$sql.=",";
}
}
echo $sql;
What does it print ?
nav33n
Purple hazed!
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
Thats it ? Its not entering the for loop ? Well, then there is the problem. Check your for loop and see if the values are being posted.
nav33n
Purple hazed!
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356