PDA

View Full Version : contact form mail



choco777
06-11-2006, 10:22 PM
contact form instead of sending info to my email it opens OE message form, with my signature. I want it to send info to address in the mailto:part of form when created. If I need to change text link how is this done? www.mayatabasco.com

navaldesign
06-12-2006, 06:22 AM
You have set your form action in mailto: . If you want the form to send the email directly without involving the visitor's OE you need to setup a php file that will process the form info and will take care of sending the email. Please have a look at Andy's tutorials: http://netisopen.com/computer/web/webpagestuff.html

choco777
06-13-2006, 07:31 PM
Thanks I was beginning to feel stranded. I know that is part o f the frustration I'm feeling. Thank you for the advice, I'll watch andy's tutorial again. The thing that isn't clear is that the tutorial seems to create the .php page and not explain much about the contact.html page. Does it need more also as far as telling it what to do or is that taking care of in the script.

choco777
06-13-2006, 07:32 PM
I had a .php file with the script copied from the tutorial. ??????

navaldesign
06-13-2006, 07:45 PM
Sorry but you've got it wrong.
1, The script MUST NOT be pasted in the form page, but in the "Thankyou" or "confirmation" or whatever you call it page.
2. The action of your form is STILL set to "mailto:". You must change that. Please follow Andy's tutorial to the letter. The form action must be set to "thankyou.php" if you called your thankyou (and processing, at the same time) page this way.

choco777
06-14-2006, 12:22 AM
Thanks, sorry about the lack of ..well u know.

choco777
06-14-2006, 12:41 AM
Sorry. I deleted the script from contact page saved republished. added script to .php form saved and re-published. I tested the contact.html and again I got the OE new message form. The script begins with type of form as public html does that make a difference if it is pasted into a .php extension form?

choco777
06-14-2006, 01:21 AM
I changed the contact.html to action blank
GET and it seems to have sent info but is not
received at my email which IS working. the othe problem is I did not enter the </script>. but no OE window but still no go............

navaldesign
06-14-2006, 06:08 AM
Let's clarify things a little.

You need two separate pages: one with your form. Let's call it "contact". This page will be the one with the form, the one that you already have. Do NOT paste anything in this page. Just double click on the form, and set the action NOT to blank, but "action.php". Save it and publish it.

The second one, lets call it "action". This is infact your thankyou page. Create it in BV, as you would do for any other page, and save it. DO NOT publish it yet.
Then copy this script:

<?php
$email = $HTTP_POST_VARS[email];
$mailto = "email@address";
$mailsubj = "Form submission";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form:\n";
while (list ($key, $val) = each ($HTTP_POST_VARS)) { $mailbody .= "$key : $val\n"; }
if (!eregi("\n",$HTTP_POST_VARS[email])) { mail($mailto, $mailsubj, $mailbody, $mailhead); }
?>


Paste this script in Notepad. Change the email address to be your email address, and if you want, change also the subject and the beggining of the message. In other words, the parts in red above.

Copy again the new, modified code from Notepad.

Now go back in your BV, in the "action" page.
Right click anywhere in the blank space of your page, and from the menu that opens, select "Page HTML". In the window that will open, click on "Inside body Tag". Now, paste the code in the bottom space. close it by clicking ok. Right click again anywhere in the blank space of your page, and select "Page properties". You will see that there is a field called "File extension". Select php from there. close this window by clicking ok.
Save the page "action" and publish it.

You're done.

If you need further help post back.

choco777
06-15-2006, 01:01 AM
o.k. very well explained thank you for the time. I did not find a page extension on the page properties.
it works the link from page to contact but I get a message no action.php found when i test action or thank you page.

choco777
06-15-2006, 01:20 AM
It isn't look like my reply went thru. I found no page extension on the page property. I tested it and I get a message that there is no action.php file found on the server.

navaldesign
06-15-2006, 06:04 AM
Of course, because the "action" page has been published as html instead of php. The php extension setting is as i said above in page properties. look here:

http://www.navaldesign.info/Tips/phpextension.jpg

choco777
06-15-2006, 07:36 AM
Again. With all the confidence in the world I say that is what I did.

I Created the action.php the Contact form

Copied script to notepad and then change the email.
I then recopied and pasted inside body tag of thank_you or action sheet. opened page props and checked php on extensions and saved both and published. I tested it and I still get the message no contact.php found on server.
I realize contact sheet is what you referred to as action sheet. That is the action.php and the other with the script is selected extension .php. RIGHT? If you can understand , great. I'm sorry and won't be opening other threads on this. I don't understand 'am I that stupid? don't answer. But thanks you are very patient.

navaldesign
06-15-2006, 07:43 AM
Please send me your loggin info using My Form (http://www.navaldesign.info/feedback13.html). I'll see to it.

navaldesign
06-15-2006, 07:49 AM
Your form is "contact.html" The method must be sent to POST and not to GET.
The action must be set in "action.php". Create a page with a thankyou message (do NOT repeat the form page, just a thankyou message and a menubar for the visitor to be able to further navigate in your site). Paste the code as instructed above. Change the file extension in .php (in Page properties). Save the file on your computer as "action". Publish it.

choco777
06-15-2006, 07:55 AM
I will do it. hjope you have heard the last from me. except on my other thread. Sorry. you were great and I appreciate it. Thank you.

choco777
06-15-2006, 08:15 AM
Thanks

navaldesign
06-15-2006, 08:17 AM
Try it now

choco777
06-15-2006, 08:23 AM
yeah, it works. what do I do with the other file? Yours isn't listed. Sorry but how can I change spelling? I do Appreciate it, a great deal. If it were not for you and racefan I'd already have surrendered. did not receive anything in my email.

navaldesign
06-15-2006, 08:27 AM
What other file? You now have the "contact.html" and the "action.php". I deleted the contact.php from your site. I also sent you the "action" bv page, so you can customize it as you want.

choco777
06-15-2006, 08:29 AM
O.k great. But your file is not listed how do I access it.

navaldesign
06-15-2006, 08:35 AM
It is the action.php file and it IS listed in FTP. However, i've also sent it to you by email, in it's original .bvp format

choco777
06-15-2006, 08:40 AM
just found it. should I delete the others?

navaldesign
06-15-2006, 08:54 AM
Waht others? I have already deleted the contact.php . Please also look at your other thread

choco777
06-20-2006, 12:23 AM
On 6-15 Navaldesign sent me a action.php. I filled out a form that asked my email and I gve my personal email. is that why contacts are going to me rather than to the website email? If so how to correct this?

VodaHost
06-20-2006, 02:55 PM
Great Thread!

navaldesign
06-20-2006, 03:47 PM
I had sent you the action.php file in it's original .bvp format. Open it in BV, go to Page html, click on "Inside Body Tag", there you will see your email address. Change it to whatever you want.