[SOLVED] Form error in code
Posted: Fri Oct 01, 2004 9:41 pm
Warning: mail() expects at most 5 parameters, 8 given in /home/rainmcom/public_html/sendmail.php on line 10
Warning: Cannot modify header information - headers already sent by (output started at /home/rainmcom/public_html/sendmail.php:10) in /home/rainmcom/public_html/sendmail.php on line 11
I have made a form on my site using php.
I used this tutorial: http://www.thesitewizard.com/archive/feedbackphp.shtml
it worked wonders until I edited it: now I get the above error. this is my php code:
the actual form code is:
Code:
the site it is on is http://www.rainbowsitedesign.com/faq.htm
what have I done wrong?
Warning: Cannot modify header information - headers already sent by (output started at /home/rainmcom/public_html/sendmail.php:10) in /home/rainmcom/public_html/sendmail.php on line 11
I have made a form on my site using php.
I used this tutorial: http://www.thesitewizard.com/archive/feedbackphp.shtml
it worked wonders until I edited it: now I get the above error. this is my php code:
Code: Select all
<?php
PHP Code:
<?
$email = $_REQUEST['visitor_email_address1'] ;
$name = $_REQUEST['visitor_name1'] ;
$url = $_REQUEST['visitor_web_address'] ;
$priority = $_REQUEST['priority'] ;
$answer = $_REQUEST['answer'] ;
$Comment = $_REQUEST['Comment'] ;
mail( "webmaster@rainbowsitedesi gn.com", "FAQ form",
$name, $url, $priority, $answer, $Comment, "From: $email" );
header( "Location: http://www.rainbowsitedesign.com /thankyou.htm" );
?>
?>Code:
Code: Select all
<form method="post" action="sendmail.php">
<P><TABLE BORDER=0 CELLSPACING=0>
<TR>
<TD WIDTH=116>
<p>Your name:</p>
</TD><TD>
<INPUT TYPE="text" NAME="visitor_name1" VALUE="" SIZE=50>
</TD></TR>
<TR>
<TD WIDTH=116>
<br>
<p>Email address:<p>
</TD><TD>
<br>
<INPUT TYPE="text" NAME="visitor_email_address1" VALUE=""
SIZE=50></H4>
</TD></TR>
<tr>
<TD WIDTH=116>
Your url:
</TD><TD>
<br><INPUT TYPE="text" NAME="visitor_web_address" VALUE=""
SIZE=50>
</TD>
</tr>
</TABLE>
<br><br>
<p>How high of a priority is your question?</p>
<P><INPUT TYPE="radio" NAME="priority" VALUE="low">low<BR>
<INPUT TYPE="radio" NAME="priority?"
VALUE="medium">medium<BR>
<INPUT TYPE="radio" NAME="priority" VALUE="high"
CHECKED>high<BR>
<INPUT TYPE="radio" NAME="priority" VALUE="urgent">urgent
</P>
<br><br>
<p>How would you like us to answer your question?</p>
<P><INPUT TYPE="checkbox" NAME="answer"
VALUE="email">Email<BR>
<INPUT TYPE="checkbox" NAME="answer"
VALUE="faqpage">On the FAQ page<BR>
</P><br><br>
<p>What is your question?</p>
<P><TEXTAREA NAME="Comment" ROWS=5 COLS=50></TEXTAREA></P>
<br>
<P><INPUT TYPE="submit" NAME="Submit"
VALUE="Submit"> <INPUT TYPE="reset" VALUE="Reset">
</FORM>what have I done wrong?