Form help again Please
Posted: Thu Sep 25, 2003 2:32 pm
HI,
I have tried to obtain info from my form using php but only manage to get the Subject line and one line in the message. I cannot get any of the other fields. I even removed all fields except three and I still cannot get the last field. Everything else works. I am very new to this. I have enclosed the code I am using.
Thanks.
HTML FORM
<html>
<head>
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<form action="contact_small.php" method="POST">
Subject:<input type="text" name="subject" size="60" tabindex="1">
<p>Message: <textarea name="content" rows="4" cols="58" tabindex="2"></textarea></p>
<p>Name: <input type="text" name="username" tabindex="3"></p>
<p></p>
<p>
<input type="submit" name="submit" value="Submit"></p>
</form>
</body>
</html>
PHP File
<html>
<head>
<title>Title here!</title>
</head>
<body>
<?php
$sendto = "sroussie@adelphia.net";
$subject = $_POST['subject'];
$content = $_POST['content'];
$username = $_POST['username'];
mail("$sendto","Subject: $subject","Message: $content","Name: $username");
echo 'Thank you.'
?>
</body>
</html>
I have tried to obtain info from my form using php but only manage to get the Subject line and one line in the message. I cannot get any of the other fields. I even removed all fields except three and I still cannot get the last field. Everything else works. I am very new to this. I have enclosed the code I am using.
Thanks.
HTML FORM
<html>
<head>
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<form action="contact_small.php" method="POST">
Subject:<input type="text" name="subject" size="60" tabindex="1">
<p>Message: <textarea name="content" rows="4" cols="58" tabindex="2"></textarea></p>
<p>Name: <input type="text" name="username" tabindex="3"></p>
<p></p>
<p>
<input type="submit" name="submit" value="Submit"></p>
</form>
</body>
</html>
PHP File
<html>
<head>
<title>Title here!</title>
</head>
<body>
<?php
$sendto = "sroussie@adelphia.net";
$subject = $_POST['subject'];
$content = $_POST['content'];
$username = $_POST['username'];
mail("$sendto","Subject: $subject","Message: $content","Name: $username");
echo 'Thank you.'
?>
</body>
</html>