cancel
Showing results for 
Search instead for 
Did you mean: 

Php script on f9 web space

Saskin
Newbie
Posts: 2
Registered: ‎19-10-2007

Php script on f9 web space

We have uploaded the following PHP script to our web page on F9,( a simple contact form, linked to our web mail) but it doesn't work on F9 although we have tried it on another server and it works fine!
any ideas or help gratefully recieved...you can also email at :info@abbotstreetstudios.co.uk
Here's the script:

<?php
$sendTo = "info@abbotstreetstudios.co.uk";
$subject = "Form Mail";
$headers = "From: " . $_POST["isim"];
$headers .= "<" . $_POST["e-mail"] .">\r\n";
$headers .= "Reply-To: " . $_POST["e-mail"];
$message = "From: " . $_POST["isim"] ."\n";
$message .= "Email: " . $_POST["email"] ."\n";
$message .= "Tel: " . $_POST["tel"];
$message .= "Message: " . $_POST["mesaj"];
mail($sendTo, $subject, $message, $headers);
?>

8 REPLIES 8
MikeWhitehead
Grafter
Posts: 748
Registered: ‎19-08-2007

Re: Php script on f9 web space

Could you possibly provide the HTML code for the form also?
Peter_Vaughan
Grafter
Posts: 14,469
Registered: ‎30-07-2007

Re: Php script on f9 web space

In what way does it not work? Error messages, no page output, no email?
Did you upload it to your www or ccgi webspace (they are different). PHP only runs on the ccgi server and will just return the code on the www server.
You also have 2 lines with From in.
MikeWhitehead
Grafter
Posts: 748
Registered: ‎19-08-2007

Re: Php script on f9 web space

Quote from: Peter
You also have 2 lines with From in.

The two lines with From in don't matter, as one is for extended header information, and one is within the body of the e-mail.
We do need to know what kind of errors etc result, if any. Out of interest, instead of using the CRLF (\r\n) within the header information, what happens if you simply use a LF (\n)? Don't keep it this way however, as it doesn't comply with the RFC.
Saskin
Newbie
Posts: 2
Registered: ‎19-10-2007

Re: Php script on f9 web space

Quote from: MikeWhitehead
Quote from: Peter
You also have 2 lines with From in.

The two lines with From in don't matter, as one is for extended header information, and one is within the body of the e-mail.
We do need to know what kind of errors etc result, if any. Out of interest, instead of using the CRLF (\r\n) within the header information, what happens if you simply use a LF (\n)? Don't keep it this way however, as it doesn't comply with the RFC.

the problem is i did not receive any error message or email in my inbox.When i try to send a email in my web page it says your message send to ... but when i checked my inbox i dont see any email.
MikeWhitehead
Grafter
Posts: 748
Registered: ‎19-08-2007

Re: Php script on f9 web space

I just tested the php code you posted and the mail gets through to me fine (didn't try to a PlusNet/F9/etc address though, my own server).
So it's either a fault with the routing of the e-mail, or there's a fault with the sending form.
ChemicalBrother
Grafter
Posts: 1,887
Thanks: 5
Registered: ‎05-04-2007

Re: Php script on f9 web space

Moderators Note:
Moved to the "Webspace Help" area of the community forum.
Roger.
RobDickson
Grafter
Posts: 653
Thanks: 3
Registered: ‎06-08-2007

Re: Php script on f9 web space

Just a thought - if the "From" and "To" e-mail addresses are both not PlusNet e-mail addresses, maybe the PlusNet servers don't let you send the e-mail.
I've no idea whether this would be a problem on websites hosted with PlusNet, because I don't use PlusNet to host my websites, but I've seen it being a problem with other hosts.
MikeWhitehead
Grafter
Posts: 748
Registered: ‎19-08-2007

Re: Php script on f9 web space

Nope not a problem. Like I said, there's no problem with the code, so it's either with the form used or the mail is getting lost en-route.
Can the OP confirm if it has been fixed or not?