hi friends,
I used following code for automatically incrementing value and stored in database. This working but it have small problem. when I submit value then only incrementing. ex, i entered details for invoice number 2, but it showing invoice number 1.
<?php
mysql_connect("localhost","root","") or die(mysql_error());
mysql_select_db("menus") or die(mysql_error());
$query2=mysql_query("select invoiceno from bill");
while($row=mysql_fetch_array($query2))
{
$var=$row['invoiceno'];
}
$count=$var+1;
echo $count;
?>
anybody knowing result for pls help to me.