title: php mysql_insert_id(); not working
body: <p>Hi guys I was hoping from some help here, please.</p>
  
  <p>I have a INSERT query to a table, after this is done I am calling:</p>
  
  <pre><code>mysql_insert_id();
  </code></pre>
  
  <p>In order to send the last ID inserted into the table to the next page like this:</p>
  
  <pre><code>$insertGoTo = "confirm_booking.php?booking_ID=" .$_POST['booking_ID']. "";
  </code></pre>
  
  <p>Unfortunately it does not work, all I get is a zero.</p>
  
  <p>The table I am inserting into has an auto increment number and values are inserted into it.</p>
  
  <p>I have also tried <code>SELECT MAX(id) FROM mytable</code>. This dosn't work neither.</p>
  
  <p>I know that this problem has been talked about already. I read all posts but nothing came useful.</p>
  
  <p>Many thanks Francesco</p>