dougvcd
February 23, 2010, 12:02pm
1
what i am trying to do is put a list on web page read from database display and allow to add
bit like a price list and order form combined and email the order
i have the html form and the database but now stuck
this is a bit of the form
<tr><td>Bakers dental delicious chews 230g £1.35</td><td><input name="Bakers dental delicious chews 230g £1.35" type="text" value="" size="2" /></td></tr>
and this is the table
Echo "<table border='1'>
<tr>
<th>ID</th>
<th>Product</th>
<th>Price</th>
<th>Qty</th>
</tr>";
while($info = mysql_fetch_array( $data ))
{
Echo "<tr>";
Echo "<td>" .$info['id'] . "</td>";
Echo "<td>" .$info['product'] . "</td>";
Echo "<td>" .$info['price'] . "</td>";
Echo "</tr>";
}
Echo "</table>";
the qty field is the one for peeps to enter
hope you can make sense of this
cheers
Doug
You need to put an <input> tag in the quantity cell, then remember that value when submitted.
dougvcd
February 27, 2010, 6:49am
3
sorry i am still having probs i ment to say that the form has to be emailed when finished so i presume it has to be html
cheers
Doug
dougvcd
February 27, 2010, 8:01am
4
in html the sreen looks like this
with this code
<body>
<form action="formtoemailpro.php" method="post">
<table width="376" border="0" cellspacing="5" style="background:#ececec">
<tr><td width="321"><strong>Price/Order List</strong></td>
</tr>
<th>Item</th>
<th><div align="left">Qty</div></th>
<tr><td><strong>Dogs Section</strong></td></tr>
<tr><td>Biscuits Dog small 2kg £14.00</td><td><input name="Biscuits Dog small 2kg £14.00" type="text" value="" size="3" /></td></tr>
<td>Biscuits Dog small 10kg £21.50</td><td><input name="Biscuits Dog small 10kg £21.50" type="text" value="" size="3" /></td></tr>
<tr><td>Bakers dental delicious chews 230g £1.35</td><td><input name="Bakers dental delicious chews 230g £1.35" type="text" value="" size="3" /></td></tr>
<tr><td><strong>YOUR DETAILS</strong></td>
</tr>
<tr><td>Name: <span class="style1">required</span></td></tr>
<td><input type="text" size="30" name="name"></td></tr>
<tr><td>Email address: <span class="style1">required</span></td></tr>
<td><input type="text" size="30" name="email"></td></tr>
<tr><td>Tel: <span class="style1">required</span></td></tr>
<td><input type="text" size="15" name="tel"></td></tr>
<tr><td> </td></tr>
<td><input type="submit" value="Send"><font face="arial" size="1"> </font></td></tr>
</table>
</form>
</body>
you can see i have to put the discription in twice so it would take a while for a lot of items
hence i thought about a database
hope this makes it a bit better to understand
cheers
Doug
What is the problem you are having? Is the information from the database not being displayed in the HTML? If not, please provide more details.
system
February 28, 2010, 7:56am
6
It’s the SESSIONS, that’s used usually for the shopping cart application…
dougvcd
February 28, 2010, 4:21pm
7
ok been trying for 3 days cant get it right
so willing to pay a small fee for some one to right script
cheers
Doug
dougvcd
February 28, 2010, 7:03pm
8
a big thanks to Anthony for his help
all sorted now
Doug