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 = "[email protected]"; $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: [email protected]\n"; mail($recepient, $subject, $contents, "From: [email protected]"); ?> can you pinpoint this basic cause. thanks in advance. Link to comment https://forums.phpfreaks.com/topic/43466-very-basic-problem/ 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. Link to comment https://forums.phpfreaks.com/topic/43466-very-basic-problem/#findComment-211092 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. Link to comment https://forums.phpfreaks.com/topic/43466-very-basic-problem/#findComment-211102 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. ??? Link to comment https://forums.phpfreaks.com/topic/43466-very-basic-problem/#findComment-211115 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. Link to comment https://forums.phpfreaks.com/topic/43466-very-basic-problem/#findComment-211121 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. Link to comment https://forums.phpfreaks.com/topic/43466-very-basic-problem/#findComment-211133 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 Link to comment https://forums.phpfreaks.com/topic/43466-very-basic-problem/#findComment-211134 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. Link to comment https://forums.phpfreaks.com/topic/43466-very-basic-problem/#findComment-211136 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 Link to comment https://forums.phpfreaks.com/topic/43466-very-basic-problem/#findComment-211137 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 = "[email protected]"; $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: [email protected]\n"; mail($recepient, $subject, $contents, "From: [email protected]"); ?> Link to comment https://forums.phpfreaks.com/topic/43466-very-basic-problem/#findComment-211139 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... Link to comment https://forums.phpfreaks.com/topic/43466-very-basic-problem/#findComment-211143 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. Link to comment https://forums.phpfreaks.com/topic/43466-very-basic-problem/#findComment-211226 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.