Jump to content

Featured Replies

Posted

just started using PHP. I'm trying to make a simple order form.

 

The form gathers information, then posts the data to a php document called processData.php, which validates the information. If the info is correct, it produces an order summary page, where the user can review thier order. From there, I want to move to another PHP document (completeOrder.php), which will

 

A) send an email to the customer with a summary of thier order

B) generate a small thank you HTML page

C) record information about the order into a txt file called customerInfo.txt

 

Whenever I get to this point tho, I click the "Complete order" button, and nothing happens. Here is some of my code.

 

 

<div style= 'position:absolute; top:570px; left:10px'><h4><font color = '#0000CC'>If this information is correct, click the Submit Order button. If not, click Go Back to make changes.</font></h4></div>

 

<div style = 'position:absolute; top:620px; left:10px;>

<form name='confirmationForm' method= 'post' action='completeOrder.php'>

<input type='Submit' value='Submit Order'>

</form></div>

 

<div style='position:absolute; top:700px;'>

<form><input type='button' value='Go Back' onClick='history.go(-1); return true;'>

</form></div>

 

The whole page can be viewed at:

 

http://ist.pct.edu/~stuwad41/sportsStore.html

 

It's cheap looking, but its a learning project :)

why not just use a normal link, seeing as nothing appears to be being passed to completeOrder.php (ie if all they need to do is visit completeOrder.php then a link + the shoppers cookie should be all that is required)

<div style =' position:absolute; top:620px; left:10px;>
	<form name='confirmationForm' method=' post' action='completeOrder.php'> 

 

You never ended the string for the <div>'s style attribute and it did a nasty snowball effect down the rest of the page.

  • Author
thanks, there was also a missing semicolon. I have corrected these errors, and now it completes the orders. All i need it to do now is send the damn email....
Guest
This topic is now closed to further replies.