473,287 Members | 1,880 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

redirect to receipt with variables

6
I make a payment using form. I then want(I think) to redirect to receipt with variables, tenant, rentpaid and
rentdue to show on receipt. Suggestions please. this is offline application.
Here are codes, payments.html, payments.php and rentreceipt.php:

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html><html lang="en">
  2.     <head>
  3.     </head>
  4.     <body bgcolor="#ccffff"><center>
  5. <font size=+2><b> record a payment</font><br>   
  6.     <form action="payment.php" method="post">
  7.         <label for="unit">Unit:</label>
  8.             <input type="text" name="unit" id="unit">
  9.         <label for="tenant">Tenant:</label>
  10.             <input type="text" name="tenant" id="tenant">
  11.         <label for="rentpaid">Amt paid:</label>
  12.             <input type="text" name="rentpaid" id="rentpaid">
  13.     <label for="hudpay">Hudpay:</label>
  14.             <input type="text" name="hudpay" id="hudpay"><br>
  15.         <label for="datepaid">Date Paid:</label>
  16.             <input type="text" name="datepaid" id="datepaid">
  17.         <label for="comments">Comments:</label>
  18.             <input type="text" name="comments" id="comments"><br>
  19.  
  20.                 <input type="submit" name="submit" value="make a payment">
  21.     </form></body></html>
  22.  
  23. <?php
  24. echo "<center>";echo date('m/d/y');echo "</center>";
  25. $id="''";
  26.  
  27. // Include config file
  28. require_once "getprerentdb.php";
  29.  
  30. //MySqli Select Query
  31. $results = $mysqli->query("SELECT * FROM paytbl");
  32.  
  33. /* --------------------------- below are posted from form ----- */
  34. $tenant=$_POST['tenant'];
  35. $unit=$_POST['unit'];
  36. $rentpaid=$_POST['rentpaid'];
  37. $hudpay=$_POST['hudpay'];
  38. $datepaid=$_POST['datepaid'];
  39. $comments=$_POST['comments'];
  40. /* --------------------------- above are posted from form ---- */
  41.  
  42. $prevbal='prevbal';
  43. $latechg='latechg';
  44. $secdep='secdep';
  45. $damage='damage';
  46. $courtcost='courtcost';
  47. $nsf='nsf';
  48. $paidsum='paidsum';
  49.  
  50. //$owe = $prevbal + $latechg + $secdep + $damage + $courtcost + $nsf;
  51. //$rentpaid=$owe; $paidsum=$owe;
  52. ?>
  53.  
  54. <!DOCTYPE html><html>
  55. <head>
  56.  
  57. <STYLE TYPE="text/css">
  58. .blue {background-color: #ccffff;}
  59. .tan {background-color: #FFD4FF;}
  60. h1.centered-cell {text-align: center;font-size: 1.1em;}
  61. </STYLE>
  62.  
  63. </head>
  64. <body><center><b><font size=+1>Rent Payment</b><p>
  65.  
  66. <?php
  67. $mysqli->query("Update paytbl SET
  68.  rentpaid = '$rentpaid', datepaid = '$datepaid', paidsum = '$paidsum', hudpay = '$hudpay', 
  69. comments = '$comments' 
  70. where unit = '$unit'");
  71. ?>
  72.  
  73. </center></body></html>
  74.  
  75. <!DOCTYPE html><html>
  76. <head>
  77.      <title>rent receipt</title>
  78. </head>
  79. <body><center>
  80. <?php
  81. echo "<center>";echo date('m/d/y');echo "<br />";
  82.  
  83. // Include config file
  84. require_once "getprerentdb.php";
  85.  
  86. //MySqli Select Query
  87. $results = $mysqli->query("SELECT * FROM numberstbl");
  88. $receiptno = "receiptno";
  89. $sql = " UPDATE numberstbl
  90.      SET $receiptno = $receiptno + 1 where id=$id  ";
  91. echo "receiptno has been updated successfully !";
  92. echo "<center>";echo "Receiptno is $receiptno";echo "<br />";
  93.  
  94. $tenant='tenant';
  95. $rentpaid='rentpaid';
  96. $rentdue='rentdue';
  97.     ?>
  98. <font size=+1> 
  99. <img src="apt-pic.jpg" alt="apartment" height=250 width=800><br>
  100.  
  101. For:<SELECT name="options">
  102. <option value="#990033" style="background-color: Violet;">Rent payment</option>
  103. <option value="#003300" style="background-color: Aquamarine;">Background Check</option>
  104. <option value="#6600cc" style="background-color: Pink;">Security Deposit Payment</option>
  105. <option value="#003300" style="background-color: Aquamarine;">Damages Payment</option>
  106. <option value="#990033" style="background-color: Violet;">Late Charges Payment</option>
  107. <option value="#003300" style="background-color: Aquamarine;">Court Costs Payment</option>
  108. <option value="#6600cc" style="background-color: Pink;">NSF Payment</option>
  109. <option value="#990033" style="background-color: Violet;"> </option>
  110. </SELECT><br>
  111. <input type="text" size = 25 STYLE="color: #000000; background-color: #D4AAFF;" name="Name" value="Business Name"> 
  112. <input type="text" size = 25 STYLE="color: #000000; background-color: #D4D4FF;" name="Addy1" value="Business address"> 
  113. <input type="text" size = 25 STYLE="color: #000000; background-color: #D4AAFF;" name="Addy2" value="City, State, Zip"> 
  114.  
  115. <TABLE BORDER="0" CELLPADDING="12" CELLSPACING="5" >
  116.    <TD>
  117. <TABLE BORDER="30" CELLPADDING="12" CELLSPACING="5">
  118. <td>
  119. <input type='text' size = 30 STYLE="color: #000000; background-color: #D4AAFF;" name="from" 
  120. value="<?php echo( htmlspecialchars($row['tenant'] ) ); ?>" /></td>
  121. <td><input type='text' size = 10 STYLE="color: #000000; background-color: D4D4FF;" name="Amount" 
  122. value="$ <?php echo( htmlspecialchars($row['Rentpaid'] ) ); ?>" /></td>
  123. <td><input type='text' size = 10 STYLE="color: #000000; background-color: D4D4FF;" name="Balance Due" 
  124. value="$ <?php echo( htmlspecialchars($row['Rentdue'] ) ); ?>" /></td>
  125. <tr>
  126. <td><input type="text" size="25" name="sign" value="Sign here" STYLE="color: 
  127. #000000; font-weight: bold; background-color: #ffccff;" onFocus="this.value=''"></td>
  128. <td colspan=2 align="center"><input type="text" size=15 name="thanks" readonly value="We Thank You:" STYLE="color: 
  129. #000000; font-weight: bold; background-color: #ffccff;" onFocus="this.value=''"></td>
  130. </tr></table>
  131.  
  132.  
  133. </b></body></html>
May 3 '21 #1
1 1686
dev7060
626 Expert 512MB
I make a payment using form. I then want(I think) to redirect to receipt with variables, tenant, rentpaid and
rentdue to show on receipt. Suggestions please.
Separate the relevant code using [code] tags. You may need to use GET/POST or session or cookie.
May 6 '21 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: BT3 | last post by:
I appreciate the links on the session variables. I had actually hit that and finished the login and supporting pages. Thanks for everything. I noticed that PHP.NET said to do a HEADER Location:...
3
by: Gary | last post by:
I am having a strange problem that I cannot solve. I have an asp page that I use for a user to login and gain access to other pages. When the user logs in I set a couple of session variables like...
2
by: Asp Help | last post by:
I'm working on a ASP applicatition to create Windows 2000 users. Because I don't want everybody to have access to the site I've changed te security in IIS 5.0 which runs on a windows 2000 Sp4...
4
by: Otto Haldi | last post by:
Hello to all I have a form in a php script with some inputs. With this form I like te send a javascript variable to the next php script. Every Input are transmittet to the next value but the...
3
by: Jessica Loriena | last post by:
I'm trying to write a simple "register form / validate and store in database / show welcome screen" application with ASP.Net. With conventional ASP, I used Session variables and it went something...
14
by: Coleen | last post by:
Hi All :-) We have an APSX application using VB.net as the code behind, which uses one or two session variables per page. These Session variables are passed to the final page and calculations...
1
by: hasanainf | last post by:
Hi all and thanking you all in advance for your help My client wants to use a receipt printer. Since I have never used one before I have some questions. 1. Unlike other printers which are set...
12
by: gigi | last post by:
How to send more than one value using response redirect? For example i can send one like this response.Redirect "pregled.asp?ime=" & strUserName but how to send two or more values? I tried...
7
by: David | last post by:
i think i just realized i'm an idiot. again. (not syntactically correct code... just pieces to illustrate) class StateObject { members like socket, receiveBuffer, receiveBufferSize,...
1
by: jdks2006 | last post by:
I work with a company who is needing to use Access 2010 to receipt in checks for paid invoices. Our issue came when our auditor found we had duplicate receipt numbers using serial numbered receipt...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.