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 3 of 3
  1. #1
    Junior Member
    Join Date
    Feb 2015
    Posts
    4
    Member #
    41518

    Need some help with a PHP form auto reply

    Hi guys,

    How can I put a auto reply confirmation on this form. I want that the customers to receive a confirmation email when they are submitting an reservation.

    Thank you very much for your help!
    PHP Code:
    <?php 

    session_start
    (); 
    $ip $_SERVER['REMOTE_ADDR'];  
    $browser $_SERVER['HTTP_USER_AGENT']; 
      
            
    $name     '';        
            
    $pn       '';         
            
    $email    '';  
            
    $message  ''
            
    $guests   ''
            
    $date     ''
            
    $time     '';  
              
              
            if(isset(
    $_POST['email']))  
            { 
             
                if(
    $_POST['captcha'] != $_SESSION['rand_code'])  
                {                             
                    echo 
    "Codigo de seguridad eroneado!";                     
                    die; 
                } 
                         
                
    $name    $_POST['name']; 
                
    $email   $_POST['email']; 
                
    $message $_POST['message']; 
                
    $pn      $_POST['pn']; 
                
    $guests  $_POST['guests']; 
                
    $date    $_POST['date']; 
                
    $time    $_POST['time'];     
                     
          
                if(
    get_magic_quotes_gpc())  
                { 
                        
    $message stripslashes($message); 
                } 

                 
    $address "support@ro-trader.com"

                 
    $e_subject 'Reserva en nombre de ' $name '.'

                 
    $e_body "Informacion Reserva\r\n\n"

                 
    $e_content "IP: $ip\nBrowser: $browser\n\nNombre: $name\nTelefono: $pn\nEmail: $email\nFecha de la reserva: $date\nHora de la reserva: $time\nComensales: $guests\n\nMensaje sobre la reserva:\n\"$message\"\n\n "


                 
    $e_reply "Puedes contacta $name al siguente email, $email"

                 
    $msg $e_body $e_content $e_reply

                 if(
    mail($address$e_subject$msg"De la: $email\r\n","-f $address")) 
                 {   
                     echo 
    "Tu reserva ha sido enviada. Contactaremos contigo vía telefónica para confirmar tu reserva. <br /> Un saludo!"
                    die; 
                 } 
                 else 
                 { 
                     echo 
    "Server\'s Mailing Function Failed!"
                 } 
            } 
            else 
            { 
                echo 
    "ERROR:Tu reserva no ha sido enviada! "
            }

  2.  

  3. #2
    Senior Member sasha_bolcina's Avatar
    Join Date
    Sep 2014
    Location
    Serbia
    Posts
    274
    Member #
    40099
    Liked
    47 times
    If you call this page after customer submitted the form, confirmation email will be sent automatically.
    There is php manual for send mail

  4. #3
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,686
    Member #
    5580
    Liked
    716 times
    So the form you are showing us is the form that YOU are receiving from the user?
    And you want to then send a confirmation to the person who filled-out the form?



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:54 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com