I've started to learn PHP today and I have some issues with my first feedback script.
After I fill all the info and send it for processing it works fine, but the email the I recieve contains only the strings that i've entered and not the vars.
example: after processing the info i get this email:
but there is no text after From: and Messege:
look at the code and tell me what's wrong..
http://helios.frihost.net/php/test.php
After I fill all the info and send it for processing it works fine, but the email the I recieve contains only the strings that i've entered and not the vars.
example: after processing the info i get this email:
| Code: |
| Message from ()
Messege: |
but there is no text after From: and Messege:
look at the code and tell me what's wrong..
| Code: |
|
<html> <body> <?php if ($_POST) { //define vars $name = $_POST['name']; $email = $_POST['email']; $messege = $_POST['messege']; $to = "helios1234@gmail.com"; $subject = "Feedback"; $body = "Message from $name ($email)\n\nMessege:\n\n$messege\n"; mail($to, $subject, $body); echo 'Done!'; }else{ ?> <center> <table width="417" border="1"> <tr> <td width="199"><table width="199" height="375" border="0"> <caption align="top"> <strong> Personal info </strong> </caption> <tr> <td height="155" scope="col"><div align="left"> <p>Your E-Mail Address : </p> <p> <form action="<?= $PHP_SELF ?>" method="post"> <input name="email" type="text" id="email"> </form> </p> </div> </td> </tr> <tr> <td><p>Your name:</p> <p> <form action="<?= $PHP_SELF ?>" method="post"> <input name="name" type="text" id="name"> </form> </p> </td> </tr> </table> </td> <td width="202"> <table width="200" height="336" border="0"> <caption align="top"> <strong>Messege</strong> </caption> <tr> <td scope="col"><div align="left"> <p>Your messege:</p> <form name="form1" method="post" action=""> <textarea name="textarea"></textarea> </form></p></div> </td> </tr> </table> </td> </tr></table> <form action="<?= $PHP_SELF ?>" method="post"> <input type="submit" name="Submit" value="Send!"> </form> </center> <?php } ?> </body> </html> |
http://helios.frihost.net/php/test.php
