I just installed xampp on my system and created connection and table in mysql using php and i even inserted one row in my table but when i tried to insert multiple rows then the flow directly gone to else part to my customize error message.
My small code is as follows:
<?php
include('connection_practice.php');
$insert_query="INSERT INTO student (NAME,ID,ADDRESS,SUBJECT,REMARKS)
VALUES('AJAY',11,'SILK BOARD','IRO','AVERAGE'),
VALUES('RITESH',12,'KARTHIK NAGAR','IRO','GOOD'),
VALUES('SUNNY',13,'HEBBAL','HR MODULE','GOOD'),
VALUES('HEMAVATHI',14,'HEBBAL','TME','GOOD'),
VALUES('GURU',15,'HEBBAL','IRO','GOOD'),
VALUES('SARITHA',16,'HEBBAL','IRO','GOOD'),
VALUES('NIHAAR',17,'MULTIPLEX','COMPUTERS','AVERAGE')";
if(mysql_query($insert_query,$conn))
{
echo "8 records added ";
}
else
{
echo "record not added ";
}
?>