I am trying to use a SELECT to get the last invoice number generated then auto increment it to put in the value attribute of a form.
<?php mysql_select_db("customers", $dbconn);
$invNum = mysql_query("SELECT MAX(invId) FROM invoices", $dbconn);?>
<td><input type="text" name="invNum" id="invNum"
size="12" value="<?php echo ++$invNum; ?>"</td>
in my play data base the last invoice is 103…
what echos in the value is Resource id #3 instead of 104.
can this be done if so can someone point me in the right direction.
Thank you