I\'m uploading image file to storage server. Before uploading I should compose filename, which contains AUTOINCREMENT VALUE in it (for example, 12345_filename.jpg).
well, try this:
$query = "SHOW TABLE STATUS LIKE 'tablename'"; $result = mysql_query($query); $row = mysql_fetch_assoc($result); var_dump($row);
output:
array(18) { [...] ["Auto_increment"]=> string(4) "3847" [...] }
This will be your next auto_increment ID.