Insert data to mysql table : mysql_db_query « MySQL Database « PHP






Insert data to mysql table

 
<?php
   $linkID = @mysql_connect("localhost","root","") or die("Could not connect to MySQL server");

   $query = "INSERT INTO mytable set id='1', title='pants', myvalue='4'";
   $result = mysql_db_query("mydatabase", $query);

   mysql_close();
?>
  
  








Related examples in the same category

1.mysql_db_query.php