PDA

View Full Version : Help with basic contact form



SherylT
10-01-2007, 11:46 PM
Hi, everyone. Taking one member's suggestion (Play It By Beer), I have tried to design a very simple submission form on my contact page.

I've been thru the tutorial three times, but can't seem to spot what is probably an obvious error.

I have set up the contact page and my thank you page. But with I tested and hit "Submit Now" I get that evil "404 error" page.

Could use the assistance of this wonderful form once again.

Andy128
10-02-2007, 01:08 AM
Sounds do-able. Just post a URL to the form and also cut and paste the php code that you are using to process the form and we'll take a look.

Andy

SherylT
10-02-2007, 05:00 AM
Okay. Here's what I have pasted in on my "action.php" page which is the Contact page. I put this in the page html section under "Beginning of body" tab.

<?PHP
$mailto = "sales@propertyslides.com";
$email = $HTTP_POST_VARS['email'];
if ($email == "") {
$email = $mailto;
}
$mailsubj = "Contact Submission Form";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form :\n";
while (list ($key, $val) = each ($HTTP_POST_VARS))
{
if ($key!="submit")
{
$mailbody .= "$key : $val\n";
}
}
mail($mailto, $mailsubj, $mailbody, $mailhead);
?>

Am I putting this in the right place?

Karen Mac
10-02-2007, 08:25 AM
Sheryl

Looks right to me... What are you putting on the form? The actual form itself. Thats where you have to call it as the name of your page, not thank you.. but action.php... im guessing thats where the actual error is.

Right click somewhere on the form itself and get properties. Form name can be whatever i guess, and then the action should be your action.php, post and then multipart form.

Karen

Karen Mac
10-02-2007, 08:33 AM
Sheryl

Ok.. you have thankyou.php instead of action.php, you have to save it as action.php You can title it thank you etc etc. Try that .. then it will work.

Karen

SherylT
10-02-2007, 03:36 PM
Okay. I changed name of thankyou.php to action.php, and I get the correct "Thank You" page I created.

When I check my email though, this is all that is coming through. No information from the message except:

Values submitted from web site form :

Maybe I don't have that code in the right place?

Andy128
10-02-2007, 04:22 PM
I sent you a form submission with test in the fields- did any come through?

Andy

navaldesign
10-02-2007, 06:06 PM
Hi sheryl,

did you solve the problem ? and, which contact form is this about ? (which site?). Please provide a link.

Karen Mac
10-02-2007, 06:14 PM
Naval

Her page is here:

http://www.propertyslides.com/contactus.php

Karen

SherylT
10-02-2007, 09:44 PM
Andy, can't check my Outlook from work, but will do so as soon as I get home. I sent a test myself and that's when I got the:

Values submitted from web site form :

and no other information.

navaldesign
10-02-2007, 10:02 PM
This usually happens when the encoding type is not set to the correct "multipart / form data" . However in your case this is correct, so please check it once again and let us know.

SherylT
10-03-2007, 02:31 AM
Form is working now. What had happened is I pasted the html code on the page where the form was and not on the action.php page. Sent myself a test and all the information was there.

Thanks for your help everyone.