Here's some code. It's kinda hard on the eyes. Sorry 🙁
Static Input:
<form method="get">
<table border=0>
<tr valign=top>
<td align=right>Your email address:</td>
<td align=left><input type=text name=email size=50></td>
</tr>
<tr valign=top>
<td align=right>Customer Name:</td>
<td align=left><input type=text name=customer size=50></td>
</tr>
<tr valign=top>
<td align=right>Comments:</td>
<td align=left><textarea name=comments cols=50 rows=5></textarea></td>
</tr>
</table><br>
Non static input(PHP)
<?
if (isset($submitQuote)) {
$connection = pg_Connect("host=$host dbnam=$db user=$user");
if (!$connection) {
die("Could not open connection to the database server");
}
$query = "INSERT INTO quote VALUES ('$email', '$customer', '$comments', '$mfg', '$part_number', '$pkg_type', '$quantity', '$work')";
$result = pg_query($connection, $query) or die("Error in query:$query. " .pg_last_error($connection));
echo "Resuest has been submitted";
pg_close($connection);
}
else {
if (isset($moreOptions)) {
$startVal += 2;
}
if (!startVal) {
$startVal = 0;
}
print "<FORM ACTION=\"$PHP_SELF\" METHOD=\"POST\">";
print "<table border=1>";
print "<tr><th>Mfg</th><th>Mfg Part Number</th><th>Package Type</th><th>Quantity</th><th>Work Required</th></tr>";
for ($i = 1; $i <= $startVal+1; $i++) {
print "<tr><td><INPUT TYPE=\"TEXT\" NAME=\"mfg\"></td><td><INPUT TYPE=\"TEXT\" NAME=\"part_number\"></td><td><INPUT TYPE=\"TEXT\" NAME=\"pkg_type\"></td><td><INPUT TYPE=\"TEXT\" NAME=\"quantity\"></td><td><INPUT TYPE=\"TEXT\" NAME=\"work\"></td></tr>";
}
print "
<tr><td colspan=2 align=center><INPUT TYPE=\"hidden\" NAME=\"startVal\" VALUE=\"$startVal\"></td><td colspan=2 align=left><INPUT TYPE=\"SUBMIT\" NAME=\"moreOptions\" VALUE=\"More Options\"></td><td colspan=2 align=right><INPUT TYPE=\"SUBMIT\" NAME=\"submitQuote\" VALUE=\"Submit Quote Request\"></td></tr>
</table>
</FORM>";
}
?>