OK. I'll pull out the order form, work with it, then post what ever I come up with.
In answer to your question, it was #2 I can't do. I can write the query for #1, and I THINK I can figure out how to presss the "print" button. 🙂
I just thought that perhaps someone here could give me a link or a script on how to loop data from a database to fill a template. I don't have anything except the simple examples in the book, and they're too simple.
EDIT:
OK all I have so far is the html code, and the body section. Here is a sample, I cut out repetitive sections and the standard headers. Remember this is from a submission form, that was designed for my site. the listed options in the form have corresponding fields in the database.
<body onLoad="javascript: setFocus();">
<div http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<form id=myForm name=myForm action="addRec.php" onsubmit='return onSubmitt();' method=post>
<table>
<tr>
<td colspan=1>
<div align=right no wrap>Address:</div>
</td>
<td colspan=9><input name="Address" id="address" value="<?=getvalue('Address')?>" style='width:100%;' Maxlength="86"></td>
</tr>
<tr>
<td colspan=1>
<div align=right>City:</div>
</td>
<td colspan=4><input name="City" id="City" value="<?=getvalue('City')?>" width='100%' Maxlength="30"></td>
<td colspan=2>
<div align=right>Zip:</div>
</td>
<td colspan=3><input name="Zipcode" width='100%' maxlength="5" value="<?=getvalue('Zipcode')?>" id="Zipcode" ></td>
</tr>
<tr>
<td><input type="checkbox" name="OptionA" value="-1" <?=isChecked(getvalue('OptionA'))?> id="OptionA"></td>
<td>Option A</td>
<td><input type="checkbox" name="OptionB" value="-1" <?=isChecked(getvalue('OptionB'))?> id="OptionB"></td>
<td>Option B</td>
</tr>
<tr>
<td ALIGN=CENTER WIDTH="30%"><input type="submit" name="Submit" value="Submit Order"></td>
<td ALIGN=CENTER WIDTH="30%"></td>
<td ALIGN=CENTER WIDTH="30%"><input type="reset" name="Submit2" value="Reset Form"></td>
</tr>
</table>