if($sent) in contact php form

Discussion in 'PHP' started by lithman, Aug 23, 2007.

  1. #1
    At the bottom of a contact.php page I'm using for a form, I have

    if($sent)
    {print "Your mail was sent successfully"; }
    else
    {print "We encountered an error sending your mail"; }
    ?>


    So when someone hits send it just takes them to a white page that says Your mail was sent successfully

    How do I edit the code to send someone to a specific url after they hit send instead of this default print your mail was sent page.

    Thanks.
     
    lithman, Aug 23, 2007 IP
  2. piniyini

    piniyini Well-Known Member

    Messages:
    514
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    170
    #2
    if($sent)
    { @header("location:http://yahoo.com"); exit(); }
    else
    {print "We encountered an error sending your mail"; }
    ?>
     
    piniyini, Aug 23, 2007 IP
  3. lithman

    lithman Well-Known Member

    Messages:
    1,189
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    130
    #3
    Thanks man...
     
    lithman, Aug 23, 2007 IP