Mega Code Archive

 
Categories / Php / Code Snippets
 

Add data to a MySQL database

<?php // Do your insert query... mysql_query("INSERT etc..."); // This finds the id of the row once it has been added... $id = mysql_insert_id(); // Display it...echo $id;?>