PDA

View Full Version : Email form



allan
06-10-2005, 01:37 PM
How do I insert this in the html? Do I insert it in "before tag", "inside body tag" or "between head tag"?

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

<?PHP
$email = $HTTP_POST_VARS[email];
$mailto = "lct@lctfinejewelers.com;
$mailsubj = "Email";
$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>
</HEAD>

I can't figure this out because there is the <HTML> <HEAD> at the top and </BODY> <HEAD> at the end of this insert and it seems that would be aduplication of the original html and it may cause confusion. I have also inserted the statcount in between the body tag already. Please give me instruction. Thanks.

Pablo
06-10-2005, 02:31 PM
Just copy the PHP script and ignore all the default HTML stuff:
Place this code in 'Beginnig of body':

<?PHP
$email = $HTTP_POST_VARS[email];
$mailto = "lct@lctfinejewelers.com;
$mailsubj = "Email";
$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);
?>

dean023
06-18-2005, 04:22 PM
Just copy the PHP script and ignore all the default HTML stuff:
Place this code in 'Beginnig of body':

<?PHP
$email = $HTTP_POST_VARS[email];
$mailto = "lct@lctfinejewelers.com;
$mailsubj = "Email";
$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);
?>


does this work for any form as i can't seem to get it to work!
do i need to set up a PHP file?

Pablo
06-18-2005, 04:35 PM
Please read:
http://www.vodahost.com/vodatalk/showthread.php?t=246

dean023
06-18-2005, 05:08 PM
Please read:
http://www.vodahost.com/vodatalk/showthread.php?t=246


I have read this and done as described but it's not working for me.

i've copied the script in notepad
called it feedback
uploaded it to file manager
which did nothing - copied feedback to public_html file
now when submitted just displays the script text

what am i doing wrong?

Pablo
06-18-2005, 06:11 PM
Did you give it the extension .PHP?
Did you correctly setup your form to use the file?

Change the form properties (in BlueVoda) to:
Action: FEEDBACK.PHP
Method: POST
EncodingType:
(remove the text/plain, so the field becomes empty)

Now create a new file using Notepad and call it: feedback.php
Enter the following code into the file:
<HTML>
<HEAD>
<TITLE>Thank you for your feedback</TITLE>
</HEAD>
<BODY>
<H2>Thank you for your feedback!</H2>
<?PHP
$email = $HTTP_POST_VARS[email];
$mailto = "feedback@yourdomain.com";
$mailsubj = "Feedback 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))
{
$mailbody .= "$key : $val\n";
}
mail($mailto, $mailsubj, $mailbody, $mailhead);
?>
</BODY>
</HEAD>

dean023
06-19-2005, 10:00 AM
this is what is in my feedback.php file:
<HTML>
<HEAD>
<TITLE>Thank you for your feedback&lt;/TITLE>
</HEAD>
<BODY>
<H2>Thank you for your feedback!&lt;/H2>
<?PHP
$email = $HTTP_POST_VARS[email];
$mailto = "dean023****.com";
$mailsubj = "Feedback 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))
{
$mailbody .= "$key : $val\n";
}
mail($mailto, $mailsubj, $mailbody, $mailhead);
?>
</BODY>
</HEAD>

i've changed the email address to mine but thats the only change.

when i saved the file i just called it FEEDBACK and the .php was added because of what file it was selected. this has been save in my public_html file is that the right place?

If i saved it as FEEDBACK.PHP it was saved as FEEDBACK.PHP.txt
which didn't came up as page not found. so i presume the first was correct.
but when i submit it opens up a blank page and thats it.

The tutorials are geared up for selling this product and makes everything so simple but now i've joined nothing seems straight forward without some knowledge.

Pablo
06-19-2005, 10:43 AM
First of all this script has nothing to do with BlueVoda and is provided for support purposes only. It is created to work around bugs and design flaws in 3rd party products. The script is provided "AS IS" without warranty of any kind. However it seems to work for most of the users.

It MUST have the .php externsion not .txt or .php.txt
Please replace all
&lt;
with
<

dean023
06-19-2005, 10:56 AM
First of all this script has nothing to do with BlueVoda and is provided for support purposes only. It is created to work around bugs and design flaws in 3rd party products. The script is provided "AS IS" without warranty of any kind. However it seems to work for most of the users.

It MUST have the .php externsion not .txt or .php.txt
Please replace all
&lt;
with
<

Pablo
many thanks for you help it is appreciated. I'm just very fustrated and believe if i can't do the simpliest of tasks then i'm not going to achieve my web site for the use of selling things. I just don't seem to be able to anything.

i've uploaded the zip file of cubecart and it won't extract the contents.

i'll change the &lt; now and give it ago

thanks again

dean023
06-19-2005, 11:03 AM
ok some progress.

now instead of a blank page i get "thankyou for your feedback"

however no email is sent to me

Sarah
06-19-2005, 12:36 PM
check your bulk mail & spam folders

dean023
06-19-2005, 02:47 PM
check your bulk mail & spam folders


you little beauty!!!!! in my spam folder on aol. used this for testing purposes will now change addy to web email.

thought i was going mad

many thanks!!!

allan
06-19-2005, 06:16 PM
Ooops again! I posted the message in the wrong forum. Okay, Pablo, How do I upload the feedback.php in the domain from the notepad. As I was saying in the other forum, you look like the guy in the movie, Matrix, but Sarah sure looks better than you. HAHAHAHAHAHAHA

allan
06-19-2005, 06:43 PM
Hey how come the time on the upper left hand corner do not correspond to the actual time. Mine is East coast time at 1:30 and the time on the reply is 5:16 pm??????

allan
06-19-2005, 06:44 PM
No, its 1:16 pm but it says 5:16 pm. That's a four hours difference!

VodaHost
06-19-2005, 07:09 PM
Allan, Allan, Allan...What are going to do with you:)
Please do not start or post multiple threads for the
same topic. it causes VodaChoas.

allan
06-19-2005, 07:25 PM
Allan, Allan, Allan...What are going to do with you:)
Please do not start or post multiple threads for the
same topic. it causes VodaChoas.

Oh, St. *****, please tell me how to upload to the domain from the notepad file feedback.php since Pablo is not around.

Pablo
06-19-2005, 09:15 PM
Use BlueFTP, check out the Voda tutorials about this great tool:
http://www.vodahost.com/DemoDemo/ftpsyms/custom_bluevoda_blueftp.htm

allan
06-20-2005, 02:00 AM
Use BlueFTP, check out the Voda tutorials about this great tool:
http://www.vodahost.com/DemoDemo/ftpsyms/custom_bluevoda_blueftp.htm

Great! Thanks Pablo. How come I didn't see this demo in the tutorial? :0

allan
06-20-2005, 02:32 AM
[QUOTE=Pablo]First of all this script has nothing to do with BlueVoda and is provided for support purposes only. It is created to work around bugs and design flaws in 3rd party products. The script is provided "AS IS" without warranty of any kind. However it seems to work for most of the users.

It MUST have the .php externsion not .txt or .php.txt
Please replace all

How do I replace all ;with <? What is &lt? I see the uploaded file has the .php.txt. I tried to change it by right click it and go to properties. I tried to change it that way and it doesn't work. I know I must have done it incorrectly. Please give me step by step instruction. Thanks.

allan
06-20-2005, 02:44 AM
I did the insert in the beginning of body with the email address changed to lct@lctfinejewelers.com and I have upload the feedback.php in the domain using the ftd manager. When I tried to submit the form for testing, it says the page cannot be found. I must have done something wrong. I changed the text object properties to feedback.php and set it to post and cleared the encoding type just like what you suggested too. Hmmmmmmmmmm. HELP!

Robert
06-23-2005, 11:55 AM
my page:

http://graphxntrix.com/GX_TEAM.html contains my form with:

name
email
text area
submit

i formatted the form properties
ACTION: GX_TEAM.php
METHOD: POST
Cleared the text/plain to be empty

I created my .php file in notepad and uploaded to my public folder. Am I missing a concept here or something because i get this error:

Parse error: parse error, unexpected T_STRING in /home/graph/public_html/GX_TEAM.php on line 11

help..i really would jump for joy to see this task finished and over with or at least some light shed on the subject THANK YOU IN ADVANCE

Pablo
06-23-2005, 12:29 PM
Well, it looks like you have an error on line 11 in the GX_TEAM.php file...

Robert
06-23-2005, 01:27 PM
$email = $HTTP_POST_VARS[email];

you might have to help me understand this...this is line 11
i have no idea what this is for or what the function is...please help

Pablo
06-23-2005, 04:07 PM
The error indicates that you need a field (editbox) with the name 'email' in your form to make the script work.
Otherwise the script does'nt know the senders email address.

Robert
06-23-2005, 10:27 PM
The error indicates that you need a field (editbox) with the name 'email' in your form to make the script work.
Otherwise the script does'nt know the senders email address.

if that is the case, then it is already there...

http://graphxntrix.com/GX_TEAM.html

the form is on the right hand side...
my GX_TEAM.php:

<HTML>
<HEAD>
<TITLE>Succesfully requested contact from The GX Team</TITLE>
</HEAD>
<BODY>
<H2>Thank you for your request. You will recieve a response shortly. In the meantime please feel free to register in

the Community Bulletin Board, and explore the site at your liesure.</H2>

<?PHP
$email = $HTTP_POST_VARS[email];
$mailto = "contact_gx@graphxntrix.com";
$mailsubj = "Contact Us";
$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>
</HEAD>

christobal
06-24-2005, 06:31 AM
Loaded your script into Zend PHP editor and the following syntax error comes up

Parse error: parse error, unexpected T_STRING in /home/graph/public_html/GX_TEAM.php on line 14

Line 14 = $mailhead = "From: $email\n";

The parse error is caused by missing double quote in line 12
Line 12 = $mailto = "contact_gx@graphxntrix.com;

Correct syntax
$mailto = "contact_gx@graphxntrix.com";
Edit the php file, upload and all should work.