The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Contact Form PHP script problem

Discussion in 'General Discussion' started by sjosue96, May 9, 2011.

Thread Status:
Not open for further replies.
  1. sjosue96

    sjosue96 Registered

    Joined:
    May 9, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I've been trying to work on a script. When I finally uploaded it (i have a godaddy account: windows account but it handles php5) but im not receiving anything when testing :/

    Heres the code:

    <?php

    $adminaddress = "perfectcleanlv@gmail.com";
    $siteaddress ="http://www.myperfectclean.com";
    $sitename = "www.MyPerfectClean.com";

    // Gets the date and time from server
    $date = date("m/d/Y H:i:s");

    // Gets the IP Address
    if ($REMOTE_ADDR == "") $ip = "no ip";
    else $ip = getHostByAddr($REMOTE_ADDR);

    //Gets the message from flash contact form
    $firstname = $HTTP_POST_VARS['firstname'];
    $lastname = $HTTP_POST_VARS['lastname'];
    $email = $HTTP_POST_VARS['email'];
    $zipcode = $HTTP_POST_VARS['zipcode'];
    $phonenumber = $HTTP_POST_VARS['phonenumber'];
    $message = $HTTP_POST_VARS['message'];



    //Process the form data!
    // and send the information collected in the Flash form to Your nominated email address
    mail ("$adminaddress","Info Request",
    "A visitor at $sitename has left the following information\n
    Name: $firstname $lastname
    Email: $email
    ZipCode: $zipcode
    Phonenumber: $phonenumber

    The visitor said:
    ------------------------------
    $message

    Logged Info :
    ------------------------------
    Using: $HTTP_USER_AGENT
    Hostname: $ip
    IP address: $REMOTE_ADDR
    Date/Time: $date","FROM:Perfect Clean" ) ;

    //This sends a confirmation to the visitor
    mail ("$email","Thank You for visiting $sitename",
    "Hi $firstname $lastname,\n
    Thank you for your interest in $sitename!
    A represenative will contact you shortly!
    Regards,
    $sitename
    $siteaddress","FROM:Perfect Clean") ;

    //Confirmation is sent back to the Flash form that the process is complete
    echo "&verify=success&";

    ?>

    Does anybody have any suggestions? or know what's wrong?
     
    #1 sjosue96, May 9, 2011
    Last edited: May 9, 2011
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,451
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    This appears to be a script thats been around a while. Not sure what this has to do with cPanel.

    You might like to have a closer look at these posts on google:
    /http://www.google.com/search?q=//Confirmation is sent back to the Flash form that the process
     
  3. sjosue96

    sjosue96 Registered

    Joined:
    May 9, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Thank you! I'll check it out!
     
Loading...
Thread Status:
Not open for further replies.

Share This Page