Order form/formmail Help

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
SpaceshipSpaceship
Watch

GHoD

Graphic DesignerEstablished Member
Impact
3
Hey i need help setting up an order form, when i hit submit it emails me whatever i put in the fields, but it doesnt check it if i leave email box empty ect, and it wont forward to paypal at end.

Will pay if needed.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
I assume this is PHP based, so here's my PHP based answer:

You can check if the field is blank or not simply by putting a

Code:
if($_POST['email'] == "") {
die("You have not entered an email.");
}

You can also get a little fancy by using the eregi() function to verify that the inputted email is in the proper email format (*****@***.***). I advise googling the regular expression for email-format matching, as regexp's aren't my strong suit.



It is also possible to use JavaScript to make sure that it is filled out, but this can be problematic if the client has JavaScript disabled in their browser.
 
0
•••
Resolved

I custom coded a php mailer to do exactly what he needed whilst having a little more flexibility.

Dan
 
0
•••
Appraise.net

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com
Catchy
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back