-
Hi, i have just made a email form in MX, however my web host wont allow me to run perl scripts and have been told to use PHP.
Has anyone out there allready got a suitable script that i could please use. Its just a simple form with name, email, phone, company and message.
Many thanks
Alex
-
< ?php
$yourEmailVar = "yourEmail@yourSite.com";
$subjectVar = "Form feedback";
$mailMessageVar = "
name: $nameVar
email: $emailVar
phone: $phoneVar
company: $companyVar
message: $messageVar
ipAddress: $_SERVER['REMOTE_ADDR']";
mail($yourEmailVar, $subjectVar, $mailMessageVar, "FROM: $nameVar");
?>
That simple, wrote that just now...
-
Hiya many thanks that is greatly appreciated.
Will give it a go now. :-)
-
Hi please excuse me for obviously being thick, but i cant get it to work.
I have wrote it out in a text file and called it form.php and have used the get url action when clicking on the submit button. Which i use the POST variables.
Any ideas what im doing wrong?
Many thanks
-
No problem, but what you need to send to the form.php is this:
http://www.yoursite.com/form.php?nam...a+nice+example
There are two ways to do this;
One:
getURL("www.yourSite.com/form.php, "targetFrameOrWindow", "GET");
Two:
getURL("www.yourSite.com/form.php?nameVar="+formVName+"&emailVar="+formVEma il+"&phoneVar="+formVPhone+"&company="+formVCompan y+"&messageVar="+formVMessage, "targetFrameOrWindow");
Do you get it?
If not don't be affraid to ask,
"Ignorance is not bliss, it's a plague" -Cache
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|