Jump to content

Need help with Processing Page of PHP program


jameshay

Recommended Posts

This is the project I need to finish. I am fairly new to php and this project has got me confused. Any help would be greatly appreciated

I am trying to do a Web form that is taking an online order form!

This is What I have so far:

This is the input page or html page:

<form method="POST" action="OnlineOrders.php">
<table border=0>
<tr>
<td width=260>NameE<br /></td>
<td width=295>Descripation<br /></td>
<td width=45>Price<br /></td>
<td width=35>Quanity<br /></td>
</tr>
<tr>
<td>Shirts</td>
<td>Red</td>
<td align="right">$11.50</td>
<td align="center"><input type="text" name="shirt" size="3" maxlength="3" /></td>
</tr>
<tr>
<td>Pants</td>
<td>blue</td>
<td align="right">$23.99</td>
<td align="center"><input type="text" name="pants" size="3" maxlength="3" /></td>
</tr>
<tr>
<td>Shoes</td>
<td>Tennis Show</td>
<td align="right">$35.25</td>
<td align="center"><input type="text" name="shoes" size="3" maxlength="3" /></td>
</tr>
<tr>
<tr>
<td>Coat</td>
<td>Winter coat</td>
<td align="right">$47.50</td>
<td align="center"><input type="text" name="coat" size="3" maxlength="3" /></td>
</tr>
<tr>
<td>Socks</td>
<td>Yellow</td>
<td align="right">$4.99</td>
<td align="center"><input type="text" name="socks" size="3" maxlength="3" /></td>
</tr>
<tr>
<td>Hats</td>
<td>Baseball Cap</td>
<td align="right">$8.99</td>
<td align="center"><input type="text" name="hats" size="3" maxlength="3" /></td>
</tr>
</tr>
</table>
</form>
<br />
<input name="submit" type="submit" value="Submit Order" />
<input type="reset" name="reset" value="Recalculate Order" />
<hr />
<p>
<a href="OrderBoard.php">View Order</a>
</p>
</body>
</html>

********************
The problem is I don't know what to do with the processing page for me to do the rest:
I am taking about OnlineOrders.php that i have at the beginning of the program:

<form method="POST" action="OnlineOrders.php">

How do i start the Processing page of the program!

Can Someone show me how do I start and I could do the rest!

Thank You!

Link to comment
Share on other sites

Your OnlineOrders.php can be something like this

<?php
if (isset($_POST['submit'])) { //Check that a form has been submitted to the script
  //get all vars from the form using $_POST array.
}

That should get you started :)

Edited by denno020
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.