View Single Post
  #4 (permalink)  
Old 04-13-2007, 09:10 PM
John's Avatar   
John John is offline
Co-Administrator
 
Join Date: Jul 2006
Age: 20
Posts: 3,469
Last Blog:
Joomla! And Incompeten...
Rep Power: 20
John has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond repute
Send a message via AIM to John Send a message via MSN to John
Default

Well you kind of have me confused how you posted your code. Which code is mainform.php and which order.php?

Also, its better to use the isset() function to test if variables are empty/nonempty. So a better way would be to do

PHP Code:
if (!isset($name)) {
include 
"mailform.php";
echo 
"Please write your contact name\n";

And as a side note, I usually like to do form validation in JavaScript, it saves a lot submissions/checks/redirects.
Reply With Quote