PDA

View Full Version : Please help with forms



mikerix
03-05-2006, 01:04 PM
I've just got my site up and running, but am struggling with how to get the forms working. I'd appreciate if someone could give me "The Complete Idiot's Guide to Forms on BlueVoda", because the following doesn't mean anything to me whatsoever:

Enter the following code into the file (replace order@example.com with your own email address):

<HTML>
<HEAD>
<TITLE>Succesfully processed your order</TITLE>
</HEAD>
<BODY>
<H2>Thanks for your order!</H2>

<?PHP
$email = $HTTP_POST_VARS[email];
$mailto = "order@example.com";
$mailsubj = "Enter Your Subject Here";
$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";
}
mail($mailto, $mailsubj, $mailbody, $mailhead);
?>
</BODY>
</HTML>





Where do I enter this "code", what am I supposed to do with the notepad document I create. Sorry, but I'm completely lost.

The form I'm trying to submit is called "info" and the e-mail address I want it to go to is mirrorm@nyc.com if this makes it easier.

Whoever can help... Much appreciated.

Mike Rix
Client I.D. 5349

navaldesign
03-06-2006, 06:12 AM
I've just got my site up and running, but am struggling with how to get the forms working. I'd appreciate if someone could give me "The Complete Idiot's Guide to Forms on BlueVoda", because the following doesn't mean anything to me whatsoever:

Enter the following code into the file (replace order@example.com with your own email address):

<HTML>
<HEAD>
<TITLE>Succesfully processed your order</TITLE>
</HEAD>
<BODY>
<H2>Thanks for your order!</H2>

<?PHP
$email = $HTTP_POST_VARS[email];
$mailto = "order@example.com";
$mailsubj = "Enter Your Subject Here";
$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";
}
mail($mailto, $mailsubj, $mailbody, $mailhead);
?>
</BODY>
</HTML>





Where do I enter this "code", what am I supposed to do with the notepad document I create. Sorry, but I'm completely lost.

The form I'm trying to submit is called "info" and the e-mail address I want it to go to is mirrorm@nyc.com if this makes it easier.

Whoever can help... Much appreciated.

Mike Rix
Client I.D. 5349

Copy this code in Notepad. Change the email address to be your email address on your vodahost account, not a third party email. Then go to File, Save As, choose File type: All files, and give it the name "info.php". Upload it on your site, at the same directory (f.e. in public_html) where your form is.

Make sure to go in the form properties and set the form action in "info.php". Please watch the text UNDER the first forms tutorial, in http://www.vodahost.com/DemoDemo/bvt/custom_bluevoda_basicform.htm

also read the "Basics about forms" in http://www.vodahost.com/vodatalk/bluevoda-tips-tricks-shortcuts/4363-basics-about-forms.html

Then if you need help post again.

mikerix
03-07-2006, 07:28 AM
I have followed these directions to the letter and am still having no joy. Clearly I am missing something. This is the message I get when I try to post a form:

res://C:\WINDOWS\system32\shdoclc.dll/pagerror.gifThe page cannot be found

The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.Please try the following:
<LI id=list1>If you typed the page address in the Address bar, make sure that it is spelled correctly.
<LI id=list2>Open the www.tengers.com (http://www.tengers.com/) home page, and then look for links to the information you want. <LI id=list3>Click the res://C:\WINDOWS\system32\shdoclc.dll/back.gif Back (javascript:history.back(1)) button to try another link.
Click res://C:\WINDOWS\system32\shdoclc.dll/search.gif Search (javascript:doSearch()) to look for information on the Internet.

HTTP 404 - File not found
Internet Explorer


Please help. This is getting frustrating.

Mike

navaldesign
03-07-2006, 07:37 AM
Please give me the URL of your form. I'll have a look

mikerix
03-07-2006, 05:30 PM
Hi,

URL: http://www.tengers.com/info.html

Much appreciated.

navaldesign
03-07-2006, 06:34 PM
Hi,

URL: http://www.tengers.com/info.html

Much appreciated.

Your form is correct. The comments Txt area has the default name S1, and should be renamed in Requests. If you use Pablo's script, then the email field must be renamed in "email". What i don't know, is the info.php that you are supposed to prepare and upload on your server. If you wish, upload the script code so i can have a look. However, when i try to get to the info.php page, i get a Page not found error, which means that either you have not uploaded it yet, or you have uploaded it under a different name. Also make sure the email address is on your vodahost account, not an external one.

mikerix
03-07-2006, 07:15 PM
This is the code that I have on my info.php notepad file:

HTML>
<HEAD>
<TITLE>Successfully processed your request</TITLE>
</HEAD>
<BODY>
<H2>Thanks for your interest!</H2>

<?PHP
$email = $HTTP_POST_VARS[email];
$mailto = "yuudqat@tengers.com";
$mailsubj = "info";
$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";
}
mail($mailto, $mailsubj, $mailbody, $mailhead);
?>
</BODY>
</HTML>


Is this correct? This is what I have uploaded.

navaldesign
03-07-2006, 07:25 PM
This is the code that I have on my info.php notepad file:

HTML>
<HEAD>
<TITLE>Successfully processed your request</TITLE>
</HEAD>
<BODY>
<H2>Thanks for your interest!</H2>

<?PHP
$email = $HTTP_POST_VARS[email];
$mailto = "yuudqat@tengers.com";
$mailsubj = "info";
$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";
}
mail($mailto, $mailsubj, $mailbody, $mailhead);
?>
</BODY>
</HTML>


Is this correct? This is what I have uploaded.

Yes, it is correct if you have changed the email field name in your form in "email". The message you uploaded in your first post, cannot be originated by this script. Maybe you were testing the form in preview? or maybe you have installed on your server another script that has among others, the "info.php" file? However "info.php" cannot be found on your site. If you have used notepad, make sure that before uploadins, you go to "Save as", then choose file type"All files", and then you give it the name info.php. Otherwise it is saved as "info.php.text" Check on your site with Blueftp to see how it is saved

mikerix
03-08-2006, 12:51 PM
Have resaved the php file.
Thanks a lot. That seems to have been the problem.

One new problem now though, although the fields from the form come through to me at my vodahost mail account, it is sending them with the following message:

Date: 3/08/2006 01:14:02 -0600
From: Mail Delivery System <Mailer-Daemon@voda5.vodahost.com>
To: yuudqat@voda5.vodahost.com
Subject: Mail delivery failed: returning message to sender All headers (http://www.tengers.com:2095/yuudqat/neomail.pl?sessionid=yuudqat-session-0.462562578105466&firstmessage=1&sort=date&folder=INBOX&message_id=d9a69e2cc9683796c1ff0228bfba583b&action=readmessage&message_id=d9a69e2cc9683796c1ff0228bfba583b&headers=all) This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

yuudqat@tengers.com
No Such User Here

------ This is a copy of the message, including all the headers. ------

Return-path: <yuudqat@voda5.vodahost.com>
Received: from yuudqat by voda5.vodahost.com with local (Exim 4.52)
id 1FGsrx-0007Lj-Uh
for yuudqat@tengers.com; Wed, 08 Mar 2006 01:14:01 -0600
To: yuudqat@tengers.com
Subject: merchandise
From:
Message-Id: <E1FGsrx-0007Lj-Uh@voda5.vodahost.com>
Date: Wed, 08 Mar 2006 01:14:01 -0600


What does this mean?

Mike

navaldesign
03-08-2006, 09:12 PM
It means that for some reason, the actual mail can't be sent. yuudqat@tengers.comb results as non existing. This is the return message to inform you that the mail could not be delivered. Check your email address in the script. Or, if you wish, use my form in http://www.navaldesign.info/feedback13.html to contact me. I'll provide you with a script ready to upload. Please check your email to make sure it is correct and perfectly functioning, and confirm me that i can use it for the script.

mikerix
03-15-2006, 06:36 AM
How do I know if my mail is fully functional? I have set it up the way it says in the tutorials, and i seem to receive other mail ok. Can you send the script to mikerix@nyc.com?

navaldesign
03-15-2006, 06:39 AM
How do I know if my mail is fully functional? I have set it up the way it says in the tutorials, and i seem to receive other mail ok. Can you send the script to mikerix@nyc.com?

Ok, i'll send you the script after a couple of hours. Make sure that you can also send mail from this email address. Before we go any further, please test your form again and let me know. There had been problems with the mails servers in the last days, and the problem could be related to that situation and not to your script. Test your form again and let me know

mikerix
04-04-2006, 12:10 PM
Hi, sorry for the long delay in this reply, but I've been without internet for 3 weeks.

I have sent mail from my tengers.com address and I receive it fine, so that's not the problem. But when I submit one of my forms from my site, I still receive the same "returned mail" message. Please help.

Regards,

Mike