100 Web Space
http://forum.100webspace.com/

PHP Mail Form?
http://forum.100webspace.com/viewtopic.php?f=4&t=3875
Page 1 of 1

Author:  nfgpunk_uk [ Fri Mar 10, 2006 8:58 pm ]
Post subject:  PHP Mail Form?

can someone show me a good php mail form tutorial? that works with 100webhosting? im not to sure how to install it!! someone help :)

thanks :?

Author:  nfgpunk_uk [ Fri Mar 10, 2006 9:02 pm ]
Post subject:  oh and kirupa mail form

oh i have tired kirupa mail form and no luck, has anyone else managed to get this to work for them? im not a free user by the way, i am paying customer.

http://www.kirupa.com/web/form_mailer.htm

??

Author:  Oliver [ Fri Mar 10, 2006 9:08 pm ]
Post subject: 

If you are on the Free plan or the Free hosting without banners plan, you won't be able to send emails. You need a Personal package at least.

Author:  nfgpunk_uk [ Fri Mar 10, 2006 9:12 pm ]
Post subject:  im a personal package holder

im on:

Personal package 300 MB Disk Space, 10,000 MB Traffic, 1 Domain Hosted

Author:  nfgpunk_uk [ Fri Mar 10, 2006 9:21 pm ]
Post subject:  so...hmm

so everything that begins with a $ must change to

$msg = $_POST['msg']
$to? would that be $_POST['to'] ?
$subject?
$headers?
$forward?
$location?



<?PHP
$to = "email";
$subject = "Results from your Request Info form";
$headers = "From: Form Mailer";
$forward = 0;
$location = "0";

$date = date ("l, F jS, Y");
$time = date ("h:i A");



$msg = "Below is the result of your feedback form. It was submitted on $date at $time.\n\n";

if ($_SERVER['REQUEST_METHOD'] == "POST") {
foreach ($_POST as $key => $value) {
$msg .= ucfirst ($key) ." : ". $value . "\n";
}
}
else {
foreach ($_GET as $key => $value) {
$msg .= ucfirst ($key) ." : ". $value . "\n";
}
}

mail($to, $subject, $msg, $headers);
if ($forward == 1) {
header ("Location:$location");
}
else {
echo "Thank you for submitting our form.";
}

?>

Author:  nfgpunk_uk [ Fri Mar 10, 2006 9:29 pm ]
Post subject: 

hmm im to new to this, could you by any chance change the it for me? you seem to know allot more then me here :D .. or just show me one or two?

Author:  Revaroo [ Fri Mar 10, 2006 9:40 pm ]
Post subject: 

The code is right... but you should change the line:
Code:
$to = "email";

Within the quotes should be the receiving email address.
And change
Code:
$headers = "From: Form Mailer";

to your account email address.. but leave the "Form: " part..

But if you're on a free hosting package then you can't send emails :/

Author:  nfgpunk_uk [ Fri Mar 10, 2006 9:42 pm ]
Post subject: 

im on:

Personal package 300 MB Disk Space, 10,000 MB Traffic, 1 Domain Hosted

Author:  Revaroo [ Fri Mar 10, 2006 9:43 pm ]
Post subject: 

Sorry skipped that part :<

Then the script should work if you make the adjustments..

Author:  nfgpunk_uk [ Fri Mar 10, 2006 9:45 pm ]
Post subject: 

i changed those lines before, but no luck at all still not getting anything :S

Code:
$to = "blah@blah.com";


but the

Code:
$headers = "From: Form Mailer";


should be? :S


Code:
$headers = "From: blah@blah.com";
?

Author:  Oliver [ Fri Mar 10, 2006 9:45 pm ]
Post subject: 

Also make sure to set the FROM or TO (depending on the purpose of your script) address to an email account hosted here. Otherwise it won't work.

Author:  Revaroo [ Fri Mar 10, 2006 9:47 pm ]
Post subject: 

Yes.. but with valid emails of course =p
and 1 of the 2 has to be your email account from your hosting package.. or so Oliver tells us

Author:  nfgpunk_uk [ Fri Mar 10, 2006 9:48 pm ]
Post subject: 

yeh its going to a email i set up with 100webhosting, and the email would be TO, as its going TO me

Author:  nfgpunk_uk [ Fri Mar 10, 2006 9:53 pm ]
Post subject: 

its all working now :) love you all for helping especially oliver

Author:  Oliver [ Fri Mar 10, 2006 10:25 pm ]
Post subject: 

You are most welcome.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/