A Big favor to ask..

Joined
Feb 22, 2006
Messages
318
Reaction score
7
Points
18
Location
Bristol, UK
Your Mac's Specs
MBP, 2.0Ghz, 2GB RAM, 120GB HDD, 1991 Powerbook 100, Gen 2 Nano, Gen 1 Touch
Hey guys,

I was wondering if one of you might be able to do me a favor?
I building a small website as best I can, and have a form as part of one of the pages.
Now i can write the form but not the script to email it to me and forward the viewer to a specific page.

Can anyone write me a basic script to do this? I would really appreciate it!

I believe it has to be written in perl (???) or php i think? I'm not too hot with this stuff yet.

Any help would be great!

Thanks
 
Joined
Jan 14, 2007
Messages
101
Reaction score
5
Points
18
Your Mac's Specs
1.67ghz powerbook G4, 1GB RAM, 100GB HD.
You can find this script on the internet. Do a google for free php script or something.
 
Joined
Mar 16, 2007
Messages
756
Reaction score
14
Points
18
you can also just do it in php. there is a mail function. just use the variables from the form.

looks like that:

mail($receiver,$subject,$message,$header);

pretty basic, but it works.
 
OP
quicksilver
Joined
Feb 22, 2006
Messages
318
Reaction score
7
Points
18
Location
Bristol, UK
Your Mac's Specs
MBP, 2.0Ghz, 2GB RAM, 120GB HDD, 1991 Powerbook 100, Gen 2 Nano, Gen 1 Touch
I've searched for free scripts but they all seem to contain ads and stuff.

dekan: could you elaborate slightly? i'm not good with php! :[
 
M

Matteh117

Guest
Easy. Using the example above I'll show you how it's done. :)

Make a php page (ex. mail_script.php) with the following;
Code:
<?php
$receiver = $_POST['receiver_address'];
$subject = 'Subject of the message here';
$message 'Body of the message here - use HTML and \n for new lines';
$header = 'From: From name <[email protected]>';
mail($receiver, $subject, $message, $header);
echo ('Mail sent message to appear on screen. Maybe add a html link to go back?');
?>
I believe that should do it for you - if not just reply and I will actually test it and fix it. :p

In the HTML form send it to this page and make sure that the address to send to is in a textfield named 'receiver_address'.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top