Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    May 2004
    Location
    The First State
    Posts
    233
    Thanks
    9
    Thanked 0 Times in 0 Posts

    form data not sending to e-mail

    I'm using this to forward my form data to an email based on CAPTCHA entry being correct:

    PHP Code:
    if ( $can_send == ) {    
      
    header('Location: http://www.mysite.com/cgi-bin/mail.php');
      } 
    else {
    header"Location: " .$_SERVER['PHP_SELF'] );

    If chars match I want the data sent to the mysite link, if the chars don't match it tells the user to re-enter the CAPTCHA text.

    I'm not sure if header is correct, I'm new to PHP so I don't know what else to use. Is this just a redirect or something? Because the data doesn't get sent.

    I have about 35 fields on the form so I don't want to add $name, $email, etc as a query string. Is there another way to foward the data?

    thanks for any help

  • #2
    Regular Coder goughy000's Avatar
    Join Date
    Nov 2005
    Location
    England
    Posts
    415
    Thanks
    0
    Thanked 0 Times in 0 Posts
    er.. dont forward?

    PHP Code:
    function sendmailfunction(){
      
    // Put your mail.php code here
    }

    if (
    $can_send == 1){     
      
    sendmailfunction();
    }else{ 
       
    header"Location: " .$_SERVER['PHP_SELF'] ); 

    PHP Freelancing!
    ByteForums!
    Scriptlance.comNeed a job done quick? post it on scriptlance! OR! your a programmer? sign up and get paid for these jobs!

  • #3
    Senior Coder
    Join Date
    Nov 2002
    Location
    North-East, UK
    Posts
    1,265
    Thanks
    0
    Thanked 0 Times in 0 Posts
    or in your mail script change any $_POST or $_GET variables to $_REQUEST

  • #4
    Regular Coder
    Join Date
    May 2004
    Location
    The First State
    Posts
    233
    Thanks
    9
    Thanked 0 Times in 0 Posts
    I went a different route and got things working.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •