Closed Thread
Results 1 to 4 of 4

Thread: php not working

  1. #1
    ecohome is offline x10Hosting Member ecohome is an unknown quantity at this point
    Join Date
    Apr 2009
    Posts
    4

    php not working

    I'm wondering if php is not working on chopin? I have a script for submitting a form to email that stopped working

  2. #2
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,635

    Re: php not working

    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()?
    Nothing is always absolutely so.

  3. #3
    ecohome is offline x10Hosting Member ecohome is an unknown quantity at this point
    Join Date
    Apr 2009
    Posts
    4

    Re: php not working

    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 by ecohome; 07-08-2011 at 06:54 PM.

  4. #4
    ecohome is offline x10Hosting Member ecohome is an unknown quantity at this point
    Join Date
    Apr 2009
    Posts
    4

    Re: php not working

    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

Closed Thread

Similar Threads

  1. Cpanel is working.But site is not working...atleast reply
    By vijjiphaggi82 in forum Free Hosting
    Replies: 2
    Last Post: 05-06-2011, 03:08 AM
  2. Cpanel is working.But site is not working.
    By vijjiphaggi82 in forum Free Hosting
    Replies: 1
    Last Post: 05-03-2011, 11:35 AM
  3. Replies: 3
    Last Post: 02-11-2010, 02:09 PM
  4. Replies: 1
    Last Post: 03-15-2008, 04:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers