need help with email respond

Discussion in 'PHP' started by dougvcd, Feb 2, 2008.

  1. #1
    ok i have a form on web site peeps fill it in and details get put into database and it sends me an email to say new record has been added
    but what i want it to do is send a reply email to the new member with some details in it
    this is the code i have for the form etc

    //Writes the information to the database 
    mysql_query("INSERT INTO `members` VALUES ('$region', '$name', '$username', '$password', '$email', '$contact' , '$parkname', '$county', '$parklocation', '$make', '$caravandetails', '$smoke', '$pets', '$kids', '$sex', '$pname', '$enq')");
     
    //compose the mail message        
     $msg= "New Record\n Region: $region, Name: $name, Username: $username:, Email: $email";
            
    //send the mail       
    mail('caravanhire3@googlemail.com','New Member',$msg)
    	
    ?> 
    <?php
    echo "your information has been added to the directory You will be redirected in three seconds!><br /><br /> 
    
    					<div class='info'>If you don't wish to wait, <a href='index.php'>click here</a>";
    					echo'<meta http-equiv="REFRESH" content="2;url=index.php">';
    ?>					
    PHP:
    if any one can help
    cheers
    Doug
     
    dougvcd, Feb 2, 2008 IP
  2. Danltn

    Danltn Well-Known Member

    Messages:
    679
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    120
    #2
    Danltn, Feb 2, 2008 IP
  3. dougvcd

    dougvcd Peon

    Messages:
    267
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    ok the problem i am getting is the $msg is printing the $msg from earleir $msg
    cheers
    Doug
     
    dougvcd, Feb 2, 2008 IP
  4. dougvcd

    dougvcd Peon

    Messages:
    267
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    ok after a bit of playing around have got it
    big thank you
    Doug
     
    dougvcd, Feb 3, 2008 IP