hy i'm using this code, but after submit it sometimes works sometimes dsnt, why?
$max = mysql_query("SELECT MAX(id2) FROM articles",$con);
$max3 = mysql_query("SELECT MAX(id) FROM articles",$con);
$resultsmax = mysql_fetch_array($max);
$resultsmax3 = mysql_fetch_array($max3);
$cur_auto_id =$resultsmax['MAX(id2)'] + 1;
$cur_auto_id2 =$resultsmax3['MAX(id)'] + 1;
.......
$qry= mysql_query("SELECT * FROM category", $con);
while($row=mysql_fetch_array($qry))
{
echo "<button class='btn btn-info' onclick=window.location='stampa.php?id=".$cur_auto_id2."';>Anteprima di stampa</button>";
i know that mysql its not used anymore...but any chances to find the error ?