Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6

Thread: contact page

  1. #1
    Junior Member
    Join Date
    Jul 2006
    Posts
    10
    Member #
    13488
    hiii..! i can't get the contact page on my site to work.. i used a php script that i got from some other site.. but it wont send messages.. here's my website http://www.nyuu-nyuu-photography.com

  2.  

  3. #2
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Any chance you could attach the feedback.php file to a post?

  4. #3
    Junior Member
    Join Date
    Jul 2006
    Posts
    10
    Member #
    13488
    yuss.. here it is

    Code:
    <?
    
    
    // ------------- CONFIGURABLE SECTION ------------------------
    
    // $mailto - set to the email address you want the form
    // sent to, eg
    //$mailto        = "youremailaddress@example.com" ;
    
    $mailto = '*EMAIL REMOVED*' ;
    
    // $subject - set to the Subject line of the email, eg
    //$subject    = "Feedback Form" ;
    
    $subject = "" ;
    
    // the pages to be displayed, eg
    //$formurl        = "http://www.example.com/feedback.html" ;
    //$errorurl        = "http://www.example.com/error.html" ;
    //$thankyouurl    = "http://www.example.com/thankyou.html" ;
    
    $formurl = "http://www.nyuu-nyuu-photography.com/feedback.html" ;
    $errorurl = "http://www.nyuu-nyuu-photography.com/notsent" ;
    $thankyouurl = "http://www.nyuu-nyuu-photography.com/sent" ;
    
    $uself = 0;
    
    // -------------------- END OF CONFIGURABLE SECTION ---------------
    
    $headersep = (!isset( $uself ) || ($uself == 0)) ? "\r\n" : "\n" ;
    $name = $_POST['name'] ;
    $email = $_POST['email'] ;
    $comments = $_POST['comments'] ;
    $http_referrer = getenv( "HTTP_REFERER" );
    
    if (!isset($_POST['email'])) {
        header( "Location: $formurl" );
        exit ;
    }
    if (empty($name) || empty($email) || empty($comments)) {
       header( "Location: $errorurl" );
       exit ;
    }
    if ( ereg( "[\r\n]", $name ) || ereg( "[\r\n]", $email ) ) {
        header( "Location: $errorurl" );
        exit ;
    }
    
    if (get_magic_quotes_gpc()) {
        $comments = stripslashes( $comments );
    }
    
    $messageproper =
    
        "This message was sent from:\n" .
        "$http_referrer\n" .
        "------------------------------------------------------------\n" .
        "Name of sender: $name\n" .
        "Email of sender: $email\n" .
        "------------------------- COMMENTS -------------------------\n\n" .
        $comments .
        "\n\n------------------------------------------------------------\n" ;
    
    mail($mailto, $subject, $messageproper,
        "From: \"$name\" <$email>" . $headersep . "Reply-To: \"$name\" <$email>" . $headersep . "X-Mailer: chfeedback.php 2.07" );
    header( "Location: $thankyouurl" );
    exit ;
    
    ?>

  5. #4
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    That's odd. What does it do when it doesn't send the email? Does it redirect you somewhere or what?

    (Also, not a good idea to post your email to a public forum :-)).

  6. #5
    Junior Member
    Join Date
    Jul 2006
    Posts
    10
    Member #
    13488
    yeah it just goes to the notsent page.. i didn't put a not sent page there yet tho so it just says not found.. am i meant to put the php file in the same directory as i put the html file for the preloader? or somewhere else?

  7. #6
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    I uploaded it to my server and got
    This message was sent from:
    http://bfsog.co.uk/somefile
    ------------------------------------------------------------
    Name of sender: bfsog
    Email of sender: user@adomian.co.uk
    ------------------------- COMMENTS -------------------------

    la

    ------------------------------------------------------------
    The error your getting is because you are trying to redirect with PHP after you have sent the header information.

    if you wish to keep the script as it is, to redirect to somewhere if it is sent, you could use a meta refresh.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:31 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com