Jump to content

very basic problem.


bilis_money

Recommended Posts

yo!  :D

 

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.  :D

thanks in advance.

Link to comment
Share on other sites

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.  :D

 

i hope you can help bro.  ;D

Link to comment
Share on other sites

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
Share on other sites

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");
?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.