Undefined index:

1Tsme1941

Member
My goodness, here again. with I thought would be simple. Object is to add 1 to the
"receiptno" in the "numbers" table and print the receiptno. please tell me in lay
terms what is wrong.
----------------------------------
code:
<?php
$server = "localhost";
$user = "root";
$pass = "";
$db = "prerentdb";
$conn = mysqli_connect($server, $user, $pass, $db);
if(mysqli_connect_error())
{ echo "<p>crap..error.</p>"; echo "<p>Exiting...</p>"; exit(); }

$receiptno="receiptno";
echo "<center>";echo date('m/d/y');

echo "Receiptno ".$_POST["receiptno"].""; // print the receiptno

$receiptno = "receiptno+1";

$querySQL = "update numbers set receiptno='$receiptno'";
$res = $conn->query($querySQL);
if($res)
{ echo "<p>record updated.</p>"; }
else
{ echo "<p>error.</p>"; exit(); }
?>.
--------------------------------------
error:
Notice: Undefined index: receiptno on line 13
 
Top