You can check some working examples given below, it is an SQL database lends itself to querying, sorting, and all types of useful functions:
Code:
<?php
session_start();
$usertechno = $_SESSION['techno'];
$usertechname = $_SESSION['techname'];
if( $usertechno == "" ) {
include 'logout.php';
exit(1);
}
echo "<html>";
echo "<head>";
echo "<title>Add Customer</title>";
echo "</head>";
echo "<body background=\"./images/precisionhvac.jpg\">";
/*
Begin input form
*/
echo "<form method=\"POST\" action=\"savecustomer.php\">";
echo "<font color=\"black\">";
echo "<br /><p align=\"center\"><font color=\"black\"><strong>Adding to $usertechname's customers.</font></p>";
// First Name
echo "<table><tr>";
echo "<td valign=\"center\">";
echo "<font color=\"black\"><strong>First</strong> ";
echo "<input type=\"text\" size=\"30\" name=\"fname\">";
echo "</td>";
// Last Name
echo "<td valign=\"center\">";
echo " <font color=\"black\"><strong>Last</strong> ";
echo "<input type=\"text\" size=\"30\" name=\"lname\">";
echo "</td>";
echo "</tr></table><br>";
// Street
echo "<strong>Street</strong> ";
echo "<input type=\"text\" size=\"30\" name=\"street\"><br><br>";
// City
echo "<table>";
echo "<tr>";
echo "<td valign=\"center\">";
echo "<font color=\"black\"><strong>City</strong> ";
echo "<input type=\"text\" size=\"30\" name=\"city\">";
echo "</TD>";
// State
echo "<td valign=\"center\">";
echo " <font color=\"black\"><strong>State</strong> ";
echo "<input type=\"text\" size=\"2\" name=\"state\">";
echo "</td>";
// Zip
echo "<td valign=\"center\">";
echo " <font color=\"black\"><strong>Zip</strong> ";
echo "<input type=\"text\" size=\"10\" name=\"zip\">";
echo "</td></tr></table><br>";
// hPhone
echo "<strong>hPhone</strong> ";
echo "<input type=\"text\" size=\"12\" name=\"hphone\"> ";
// cPhone
echo "<strong>cPhone</strong> ";
echo "<input type=\"text\" size=\"12\" name=\"cphone\"><br><br>";
// Email
echo "<strong>Email</strong> ";
echo "<input type=\"text\" size=\"30\" name=\"email\"><br><br>";
// Notes
echo "<strong>Notes</strong> ";
echo "<textarea rows=\"2\" name=\"notes\" cols=\"80\"></textarea><br><br>";
// Location
echo "<strong>Location</strong> ";
echo "<input type=\"text\" size=\"10\" name=\"unitlocation\">";
// Type
echo " <strong>Type</strong> ";
echo "<input type=\"text\" size=\"10\" name=\"unittype\">";
// Qty
echo " <strong>Quantity</strong> ";
echo "<input type=\"text\" size=\"2\" name=\"qty\">";
// Manager
echo " <strong> Property Manager 1=yes / 0=no</strong> ";
echo "<input type=\"text\" size=\"2\" name=\"mgr\">";
// Techno
//echo " <strong>Your Tech. No.</strong> ";
//echo "<input type=\"text\" size=\"3\" name=\"techno\">";
// Buttons
// Submit
echo "<p align=\"center\"><table><tr>";
echo "<td><input type=\"submit\" name=\"Submit\"
value=\"Submit\"></td>";
// Clear Form
echo " ";
echo "<td><input type=\"reset\" name=\"Reset\" value=\"Clear
Form\"></td>";
// Done
echo " ";
echo "<td><input type=\"button\" value=\"Done\" onclick=\"window.location='./index-go.php'\"/></td>";
echo "</tr></table></p>";
// End of input form
echo "</form>";
echo "</body>";
echo "</html>";
?>
Bookmarks