bilis_money Posted March 20, 2007 Share Posted March 20, 2007 yo! the error message, Parse error: syntax error, unexpected '{' in /home/sexyexot/public_html/email.php on line 1 and my codes below, <?php if (isset($_POST['Submit'])){ $recepient = "contact@mydomain.com"; $subject = "You have Guest! from mydomain.com"; $contents = "Name: " . $_POST['name'] . "\n\nCountry: " . $_POST['country'] . "\n\nCity: " . $_POST['city'] . "\n\nPhone: " . $_POST['phone'] . "\n\nEmail: " . $_POST['email'] . "\n\nHotel: " . $_POST['hotel'] . "\n\nInquiry: " . $_POST['enquiry']; } $headers = "Reply-to: pleasurephil@yahoo.com\n"; mail($recepient, $subject, $contents, "From: contact@mydomain.com"); ?> can you pinpoint this basic cause. thanks in advance. Quote Link to comment Share on other sites More sharing options...
Orio Posted March 20, 2007 Share Posted March 20, 2007 Is this the whole code? If not, show all the code please. Orio. Quote Link to comment Share on other sites More sharing options...
bilis_money Posted March 20, 2007 Author Share Posted March 20, 2007 that is all the php codes. ok, here is the form codes, <form method="POST" action="http://www.mydomain.com/email.php"> <table width="350" height="424" border="0"> <tr> <td width="119" height="26" bgcolor="#000000"><span class="style11">name:</span></td> <td width="221" bgcolor="#000000"><input type="text" name="name" /></td> </tr> <tr> <td height="25" bgcolor="#000000"><span class="style12">country:</span></td> <td bgcolor="#000000"><input name="country" type="text" id="country" /></td> </tr> <tr> <td height="26" bgcolor="#000000"><span class="style12">city:</span></td> <td bgcolor="#000000"><input name="city" type="text" id="city" /></td> </tr> <tr> <td height="25" bgcolor="#000000"><span class="style12">phone:</span></td> <td bgcolor="#000000"><input name="phone" type="text" id="phone" /></td> </tr> <tr> <td height="29" bgcolor="#000000"><span class="style12">email:</span></td> <td bgcolor="#000000"><input name="email" type="text" id="email" /></td> </tr> <tr> <td height="25" bgcolor="#000000"><span class="style12">hotel:</span></td> <td bgcolor="#000000"><input name="inquiry" type="text" id="inquiry" /></td> </tr> <tr> <td height="191" bgcolor="#000000"><span class="style12"><strong>inquiry</strong></span></td> <td bgcolor="#000000"><textarea name="textarea"></textarea></td> </tr> <tr> <td bgcolor="#000000"> </td> <td bgcolor="#000000"><div align="center"> <input type="submit" name="Submit" value="Submit" /> </div></td> </tr> </table> </form> I know it's basic, the problem is i'm a little dizzy right now, that's why i'm confuse. i hope you can help bro. Quote Link to comment Share on other sites More sharing options...
obsidian Posted March 20, 2007 Share Posted March 20, 2007 Looks ok overall. Is the email.php being included within any other pages? In the code you posted, I don't see any issue. Typically, with that sort of error, you would have missed one of the closing parenthesis ")" in your if statement, but in your posted code, they're both there. ??? Quote Link to comment Share on other sites More sharing options...
bilis_money Posted March 20, 2007 Author Share Posted March 20, 2007 yes obsidian that is the exact code, i cut and paste it. I'm also very confuse.. Looks ok overall. Is the email.php being included within any other pages? no. it has two files only .htm for form and .php for that php email codes. Quote Link to comment Share on other sites More sharing options...
obsidian Posted March 20, 2007 Share Posted March 20, 2007 yes obsidian that is the exact code, i cut and paste it. Here's what's weird: I copied and pasted your code into a test script, and I have absolutely no parse errors. Quote Link to comment Share on other sites More sharing options...
phpwonderkid Posted March 20, 2007 Share Posted March 20, 2007 Try Changing the name of the button...Like something as Submit1 or someother name...It may work Quote Link to comment Share on other sites More sharing options...
bilis_money Posted March 20, 2007 Author Share Posted March 20, 2007 ok, thanks i'll try your suggestion. Quote Link to comment Share on other sites More sharing options...
phpwonderkid Posted March 20, 2007 Share Posted March 20, 2007 Also let me know if it is working or not Quote Link to comment Share on other sites More sharing options...
only one Posted March 20, 2007 Share Posted March 20, 2007 hes got an older version of php try this: <?php if (isset($_POST[submit])){ $recepient = "contact@mydomain.com"; $subject = "You have Guest! from mydomain.com"; $contents = "Name: " . $_POST['name'] . "\n\nCountry: " . $_POST['country'] . "\n\nCity: " . $_POST['city'] . "\n\nPhone: " . $_POST['phone'] . "\n\nEmail: " . $_POST['email'] . "\n\nHotel: " . $_POST['hotel'] . "\n\nInquiry: " . $_POST['enquiry']; } $headers = "Reply-to: pleasurephil@yahoo.com\n"; mail($recepient, $subject, $contents, "From: contact@mydomain.com"); ?> Quote Link to comment Share on other sites More sharing options...
bilis_money Posted March 20, 2007 Author Share Posted March 20, 2007 no it is still not working... i should rest for a while, i'm working 24/7 already. maybe i am really dizzy. but if you got the solution guys please just post . thank you, thank you in advance... Quote Link to comment Share on other sites More sharing options...
obsidian Posted March 20, 2007 Share Posted March 20, 2007 no it is still not working... At this point, you should probably give us all your specs as well: OS, PHP version, etc. As I stated above, this goes beyond simply a syntax issue, I believe. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.