Visualizzazione dei risultati da 1 a 7 su 7

Hybrid View

  1. #1
    Utente di HTML.it
    Registrato dal
    Jan 2011
    Messaggi
    71
    Ma quel form mi sembra davvero strano che funzioni... comunque ti posto un esempio trovato su google

    codice HTML:
    <h2>Your Title</h2>
     
    <form action="receiving.php" method="POST">
     
    Name:<br><input type="text" name="name" size="40" /><br><br>
     
    Email:<br><input type="text" name="email" size="40" /><br><br>
     
    Phone:<br><input type="text" name="phone" size="40"><br><br>
     
    Message:<br><textarea name="message" rows="3" cols="31" > </textarea><br><br>
     
    <input type="submit" name="submit" value="Submit" />
    <br><br>
     
    </form>
    Codice PHP:
    <?php
     
        $name 
    $_POST['name'];
        
    $email $_POST['email'];
        
    $phone $_POST['phone'];
        
    $message $_POST['message'];

        
    $from_add "contactform@yourwebsite.com";
     
        
    $to_add "yourname@yourwebsite.com";
         
        
    $subject "Your Subject Name";
         
        
    $message "Name:$name \n Email: $email \n Phone: $phone \n
    Message: 
    $message";
         
        
    $headers "From: $from_add \r\n";
        
    $headers .= "Reply-To: $from_add \r\n";
        
    $headers .= "Return-Path: $from_add\r\n";
        
    $headers .= "X-Mailer: PHP \r\n";
         
         
        if(
    mail($to_add,$subject,$message,$headers))
        {
            
    $msg "Mail sent";
        }

         
    print 
    "<p> Thank you $name for your message,
        we will be in contact shortly. <a href=\"index.php\">Click here</a>
        to continue </p>" 
    ;
         
     
     
    ?>
    Buon lavoro

  2. #2
    Utente di HTML.it
    Registrato dal
    Aug 2012
    Messaggi
    54
    Quote Originariamente inviata da rash Visualizza il messaggio
    ma quel form mi sembra davvero strano che funzioni... Comunque ti posto un esempio trovato su google

    codice HTML:
    <h2>your title</h2>
     
    <form action="receiving.php" method="post">
     
    name:<br><input type="text" name="name" size="40" /><br><br>
     
    email:<br><input type="text" name="email" size="40" /><br><br>
     
    phone:<br><input type="text" name="phone" size="40"><br><br>
     
    message:<br><textarea name="message" rows="3" cols="31" > </textarea><br><br>
     
    <input type="submit" name="submit" value="submit" />
    <br><br>
     
    </form>
    Codice PHP:
    <?php
     
        $name 
    $_post['name'];
        
    $email $_post['email'];
        
    $phone $_post['phone'];
        
    $message $_post['message'];

        
    $from_add "contactform@yourwebsite.com";
     
        
    $to_add "yourname@yourwebsite.com";
         
        
    $subject "your subject name";
         
        
    $message "name:$name \n email: $email \n phone: $phone \n
    message: 
    $message";
         
        
    $headers "from: $from_add \r\n";
        
    $headers .= "reply-to: $from_add \r\n";
        
    $headers .= "return-path: $from_add\r\n";
        
    $headers .= "x-mailer: Php \r\n";
         
         
        if(
    mail($to_add,$subject,$message,$headers))
        {
            
    $msg "mail sent";
        }

         
    print 
    "<p> thank you $name for your message,
        we will be in contact shortly. <a href=\"index.php\">click here</a>
        to continue </p>" 
    ;
         
     
     
    ?>
    buon lavoro

    grazie dell'aiuto sei un drago!!
    Ciao

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.