php not working

Status
Not open for further replies.

ecohome

New Member
Messages
5
Reaction score
0
Points
0
I'm wondering if php is not working on chopin? I have a script for submitting a form to email that stopped working
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
PHP is working on Chopin.

Not sure about PHP mail() or other issues (some email hosts [Hotmail] refuse to accept mail from x10 mail servers). Do you check the return value of mail()?
 

ecohome

New Member
Messages
5
Reaction score
0
Points
0
this is what the code is, it used to work before



<?php
if(isset($_POST['submit'])) {


$to = "emailgoeshere";
$subject = "subjecthere";
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$message =
$_POST['message'];

$body = "From: $name_field\n E-Mail:
$email_field\n Message:\n $message";

echo "Your message has been
sent. We will contact you shortly";
mail($to, $subject, $body);


} else {


echo "blarg!";


}
?>


how do you check the return value for mail()? ?
 
Last edited:

ecohome

New Member
Messages
5
Reaction score
0
Points
0
ok I put this into a info.php file and this is what I got:


Warning: phpinfo() has been disabled for security reasons in
/home/ecohome/public_html/test/info.php on line 2


Warning: mail() expects at least 3 parameters, 0 given in
/home/ecohome/public_html/test/info.php on line 3


does this mean the mail php is working ok? sorry I dont' know php at all just wondering if I Have to use a new form to mail script or somethign else
 
Status
Not open for further replies.
Top