Page 1 of 1

form error

Posted: Sun Apr 26, 2009 5:42 am
by wero86
xxxx

Re: form error

Posted: Sun Apr 26, 2009 8:53 am
by Yossarian
Take a look at my reply in this other thread today.

Turn on error reporting, var_dump the incoming POST variables and take a close look at them.

Re: form error

Posted: Sun Apr 26, 2009 11:49 am
by McInfo
How did you arrive at the page that gives you the errors? Did you click a submit button on a form? If you used a form, please share the code for the form.

Edit: This post was recovered from search engine cache.

Re: form error

Posted: Sun Apr 26, 2009 12:02 pm
by wero86
xxx 

Re: form error

Posted: Sun Apr 26, 2009 12:08 pm
by wero86
xxx

Re: form error

Posted: Sun Apr 26, 2009 12:14 pm
by McInfo
This is a quick reply to this code, then I will read your lengthy post.
wero86 wrote:

Code: Select all

<form action="Test/sendinfo.php" name="Contact" id="Contact">
The form is missing a method attribute.

Code: Select all

<form method="post" action="Test/sendinfo.php" name="Contact" id="Contact">
Edit: This post was recovered from search engine cache.

Re: form error

Posted: Sun Apr 26, 2009 3:27 pm
by wero86
tried doing as you suggested didnt have any affect

Re: form error

Posted: Sun Apr 26, 2009 3:55 pm
by McInfo
Changing the method to POST should have cured these errors:
Notice: Undefined index: name in \\[...]\htdocs\sendinfo.php on line 3

Notice: Undefined index: email in \\[...]\htdocs\sendinfo.php on line 4

Notice: Undefined index: message in \\[...]\htdocs\sendinfo.php on line 5
Do you still see those errors?

To fix the other error, I think you need to change some of the $email_from variables to $email_to.

Code: Select all

$headers =
"From: $email_to .\n";
"Reply-To: $email_from .\n";
 
ini_set("sendmail_from", $email_to);
$sent = mail($email_to, $email_subject, $message, $headers, "-f" . $email_to);
Edit: This post was recovered from search engine cache.