Reply to topic  [ 4 posts ] 
Find the error in my code 
Author Message
Forum Admin
User avatar

Joined: Sat Jan 25, 2003 7:49 pm
Posts: 4987
Post Find the error in my code
I edited the following code, and I swear I didn't muck anything up but I'm getting 500 server errors.

Take a look at the following code:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<title>Canongate Order Form</title>
<?php
   
   // Grab the form vars
   $expiration = (isset($_POST['expiration'])) ? $_POST['expiration'] : '' ;
   $course = (isset($_POST['course'])) ? $_POST['course'] : '' ;
   $auth = (isset($_POST['auth'])) ? $_POST['auth'] : '' ;
   $phone = (isset($_POST['phone'])) ? $_POST['phone'] : '' ;
   $quantity = (isset($_POST['quantity'])) ? $_POST['quantity'] : '' ;
   $address = (isset($_POST['address'])) ? $_POST['address'] : '' ;
   

   
   mail("my@workemailremoved.com","Test Order Form ",
   "Expiration: $expiration\n
   Course Name: $course\n
   Authorized By: $auth\n
   Course Phone: $phone\n
   Quantity: $quantity\n
   Address: $address")\n;


?>
</head>
<body>
   <div style="text-align:center">
      <h1>Thank You for filling out our form</h1>
      <h2>The email has been sent</h2>
   </div>
</body></html>

_________________
Varadin
Forum Administrator
---------------------


Thu Mar 24, 2011 9:31 am
Profile ICQ WWW
BbB Member
User avatar

Joined: Sat Jan 25, 2003 10:52 pm
Posts: 5052
Location: Kansas City, MO
Post Re: Find the error in my code
Quote:
Address: $address")\n;


the \n after the ") is probably doing it.

Not a PHP guru or anything, but I'd assume that's not what it's meant to be doing.

_________________
“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.”
Geeks Win Cools Stuff That Geeks Want
Collection of Funny images For the Lols
NASA Space Photos for the Wows
My Personal C# .NET Developer Blog


Thu Mar 24, 2011 9:37 am
Profile YIM WWW
Forum Admin
User avatar

Joined: Sat Jan 25, 2003 7:49 pm
Posts: 4987
Post Re: Find the error in my code
You were right, now to see if I get the email.

Thanks Unk.. I got a little crazy with the copy pasta and didn't delete that.

_________________
Varadin
Forum Administrator
---------------------


Thu Mar 24, 2011 9:40 am
Profile ICQ WWW
BbB Member
User avatar

Joined: Sat Jan 25, 2003 10:52 pm
Posts: 5052
Location: Kansas City, MO
Post Re: Find the error in my code
No Problem

_________________
“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.”
Geeks Win Cools Stuff That Geeks Want
Collection of Funny images For the Lols
NASA Space Photos for the Wows
My Personal C# .NET Developer Blog


Thu Mar 24, 2011 9:44 am
Profile YIM WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.