I am in the process of completing a php program. The issue i am having is getting the data to display on a page after submission so that the data can be printed and handed to the customers.
My current code is
<?php
if(isset($_POST['name'])) {
$date = $_POST['date'];
$name = $_POST['name'];
$address = $_POST['address'];
$tel = $_POST['telephone'];
$cell = $_POST['cellphone'];
$email = $_POST['email'];
$equip = $_POST['equipment'];
$manu = $_POST['manufacturer'];
$model = $_POST['model'];
$pri = $_POST['priority'];
$notes = $_POST['notes'];
}
?>
<table width="601" border="1" cellpadding="2">
<tr>
<td>Date:</td>
<td width="181"><?php echo $msg; ?></td>
<td width="82">Priority:</td>
<td><?php echo $msg; ?></td>
</tr>
<tr>
<td width="140">Customer Name:</td>
<td colspan="2"><?php echo $name; ?></td>
<td width="162"> </td>
</tr>
<tr>
<td>Address:</td>
<td><?php echo $email; ?></td>
<td> </td>
<td> </td>
</tr>
</table>
<div id="disc">
</div>
<p> <button type="button" onclick="window.print();" >Print</button> | <a href="customer_device.html.php"><button type="button">Add New</button></a> </p>
This is code from the submission page
$q = "INSERT INTO customer (custid, date, custName, address1, address2, phone, cellphone, email, equipment, manufacturer, model, serial, imei, notes, priority) VALUES (' ', '$cd', '$cn','$ad1','$ad2','$p','$cp','$e', '$ty', '$mn', '$mo', '$sn', '$in', '$n', '$pr')";
$result = @mysqli_query ($dbcon, $q); // Run the query.
if ($result) { // If it ran OK.
header ("location: customer_device_print.html.php");
exit();
Any help would be really appreciated.