MAIL FORM in php .. satus not working??????

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
HG
Forum Newbie
Posts: 18
Joined: Mon Jun 10, 2002 11:40 am
Location: sweden
Contact:

MAIL FORM in php .. satus not working??????

Post by HG »

Yes I have a nother problem... heheheh...

trying to make a mail form that will send a mail to my mail adress by a html form.. this is the form..

Code: Select all

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="../css/tabel.css" type="text/css">
<link rel="stylesheet" href="../css/tabellinks.css" type="text/css">
<link href="../css/text.css" rel="stylesheet" type="text/css">
<link href="../css/tabel.css" rel="stylesheet" type="text/css">
</head>
<STYLE TYPE="text/css"><!--

BODY &#123;

scrollbar-arrow-color:#D5EBC1;

	scrollbar-base-color:#006600;

	scrollbar-shadow-color:#D5EBC1;

	scrollbar-face-color:#006600;

	scrollbar-highlight-color:#D5EBC1;

	scrollbar-dark-shadow-color:white;

	scrollbar-3d-light-color:#D5EBC1;

&#125;

//--></STYLE>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0">
  <tr> 
    <td height="6" bgcolor="#006600"> <div align="center"><font color="#FFFFFF">-mail 
        info-</font></div></td>
  </tr>
</table>
<table width="100%" border="0" bgcolor="#D5EBC1">
  <tr> 
    <td width="23%">e-mail.</td>
    <td width="77%"><a href="mailto:hgdesign@bonetmail.com">hgdesign@bonetmail.com</a></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr> 
    <td>mail form.</td>
    <td>Send me a e-mail the fast way.</td>
  </tr>
  <tr> 
    <td width="23%">&nbsp;</td>
    <td width="77%"><FORM method = "POST" action="mailform.php">
        name:<br>
        <input type="text" name="name">
        <br>
        e-mail:<br>
        <input type="text" name="email">
        <br>
        subject:<br>
        <input type="text" name="subject">
        <br>
        story:<br>
        <textarea name="story" rows="8"></textarea>
        <br>
        <input type="submit" name="Submit" value="Submit">
        <input type="reset" name="Reset" value="Reset">
        <br>
      </form></td>
  </tr>
</table>
<p>&nbsp;</p>
</body>
</html>
and this is the mailform.php code...

<?
$msg="Sender Name:\t$name\n";
$msg.="Sender Email"\t$email\n";
$msg.="Sender Subject\t$subject\n";
$msg.="Story:\t$story\n\n";

$recipient="hgdesign@bonetmail.com";
$subject="Web Site Feedback";
$mailheaders="From: My Web Site <>\n";
$mailheaders.="Reply-To: $email\n\n";

mail ($recipient, $subject, $msg, $mailheaders);

echo "";
echo"
Thank you, $name
";
echo"
Check your mail for upcoming events.

";
echo"";

?>
have no clue what is goning wrong.. have you... plz say you have..
thx
jason
Site Admin
Posts: 1767
Joined: Thu Apr 18, 2002 3:14 pm
Location: Montreal, CA
Contact:

Post by jason »

What is NOT happening?

Also, when you do echo $msg; what do you get?
HG
Forum Newbie
Posts: 18
Joined: Mon Jun 10, 2002 11:40 am
Location: sweden
Contact:

SORRY FORGOT TO POST THAT...

Post by HG »

this is the error mess...

Warning: Unexpected character in input: ''' (ASCII=92) state=1 in D:\webb\hgtwo\contact\mailform.php on line 3

Parse error: parse error, unexpected T_STRING in D:\webb\hgtwo\contact\mailform.php on line 3
the problem is that there is now email coming to my email adress from the form...

sorry agen for missing to post this
Post Reply