need help with echo – Programming

Hello, I am trying to print a rental receipt. I enter a tenant name, amtpaid and amtdue in the form and
expect to display renter name, amtpaid and balance due (if applicable). I am also trying to update the
receptionno in the numberstbl and display the new one. I’ve tried echo, print and can’t get the
values ​​to display. please help.

the receipt code:
$server = “localhost”;
$user = “root”;
$password = “”;
$dbname = “numbersdb”;

// Create a connection
$connection = mysqli_connect($server, $user, $password, $dbname);
// Check the connection
if (!$connection) {
die(“Connection failed: ” . mysqli_connect_error());
}

SET receptionno = $receiptno + 1 where id=$id”;

if (mysqli_query($connection, $sql)) {
echo “Record successfully updated”;
} other {
echo “Error updating record: ” . mysqli_error($connection);
}

$tenant=$_POST[‘tenant’];
$amtpaid=$_POST[‘amtpaid’];
$amtdue=$_POST[‘amtdue’];
$id=”id”;
$receiptno=’receiptno’;
$baldue = $amtdue – $amtpaid;

echo “receiptno is $receiptno”;echo “
“;
?>



var namemonth = [ “January”,”February”,”March”,”April”,”May”,”June”,”July”,
  “August”,”September”,”October”,”November”,”December”     ];
var today = new Date();
var date = namemonth[today.getMonth()] + ” – ” + today.getDate() + ” – ” + today.getFullYear();



Rent receipt

Date :

For :



paying tenant is:
The amount paid is:
echo “balance due is: $baldue”;

State Council views IT as an alternative to graduation requirements

  • Sheldon Students Create Box Counting Program | New
  • Everything you need to know to become a software engineer
  • HILLS CREEK AND CHERRY SPRINGS STATE PARKS OFFER IN-PERSON AND VIRTUAL PROGRAMS
  • Comments are closed.