Author Topic: How to insert two records in one code  (Read 288 times)

mirfath

  • New Member
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
How to insert two records in one code
« on: August 10, 2010, 10:42:50 AM »

this is the code to insert one record how do you use the same code to insert two records!!!!



<html>
<body>
<?php $link-=mysql_connect("localhost","root","");
$db=my_sql_select_db("student");
$sql="INSERT INTO `student`.`info`(`studentid`,`name`,`course`) VALUES(100,'Nimal','HD');";
$result=mysql_query($sql);
if($result)
{
   echo"Record inserted";
}
else
{
  echo"Record not inserted <br>";
  echo mysql_error();
}
?>
</body>
</html>