Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: Forms

  1. #11
    Join Date
    Aug 2006
    Posts
    6,572
    Tokens
    2,859

    Latest Awards:

    Default

    I've tried that and changed it to my email but it still isn't coming into my inbox.

  2. #12
    Join Date
    Nov 2006
    Posts
    7,395
    Tokens
    2,462

    Latest Awards:

    Default

    Quote Originally Posted by Sam Carvalho View Post
    I've tried that and changed it to my email but it still isn't coming into my inbox.
    Make sure you check your spam inbox, also, what email are you sending it to?
    Hi

  3. #13
    Join Date
    Aug 2006
    Posts
    6,572
    Tokens
    2,859

    Latest Awards:

    Default

    My Yahoo Email and it isn't in the Spam.

    Also, how can I make the email part and main content part optional?
    I want them to have the choice to leave it blank and the main part and still submit not them having to put something in.

  4. #14
    Join Date
    Aug 2006
    Posts
    6,572
    Tokens
    2,859

    Latest Awards:

    Default

    If its so hard to get it to send to a email is it possible for it to be sent to a file on the server?

  5. #15
    Join Date
    Jan 2009
    Posts
    11
    Tokens
    0

    Default Pm Me

    PM And I Will Sort It

  6. #16
    Join Date
    Jul 2004
    Location
    Scotland
    Posts
    17,702
    Tokens
    61,194
    Habbo
    Habbic

    Latest Awards:


  7. #17
    Join Date
    Apr 2005
    Posts
    4,614
    Tokens
    1,290

    Latest Awards:

    Default

    Page called contact.html or whatever you want

    HTML Code:
    <html>          
    <head>
    <title>I WANA SEND UR FORMZ.</title>
    </head>
    
    <body>
    <form action="send.php" method="POST">
    Name:<br>
    <input type="text" name="name"><br><br>
    Message:<br>
    <textarea name="message">MESSAGE HERE</textarea><br><br>
    <input type="submit" value="Send Message">
    </form>
    </body>
    </html>         
    send.php
    PHP Code:
    <?php 
              
    $name 
    $_POST["name"]; 
    $message $_POST["message"];
              
    $write fopen("formsubmissions.php""a"); 
    fwrite($write"Name<br>$name<br><br>Message<br>$message<br><br>");
    fclose($write);
              
    echo(
    'All done fnx');

    ?>

  8. #18
    Join Date
    Aug 2006
    Posts
    6,572
    Tokens
    2,859

    Latest Awards:

    Default

    Quote Originally Posted by Robbie! View Post
    Page called contact.html or whatever you want

    HTML Code:
    <html>          
    <head>
    <title>I WANA SEND UR FORMZ.</title>
    </head>
    
    <body>
    <form action="send.php" method="POST">
    Name:<br>
    <input type="text" name="name"><br><br>
    Message:<br>
    <textarea name="message">MESSAGE HERE</textarea><br><br>
    <input type="submit" value="Send Message">
    </form>
    </body>
    </html>         
    send.php
    PHP Code:
    <?php 
              
    $name 
    $_POST["name"]; 
    $message $_POST["message"];
              
    $write fopen("formsubmissions.php""a"); 
    fwrite($write"Name<br>$name<br><br>Message<br>$message<br><br>");
    fclose($write);
              
    echo(
    'All done fnx');

    ?>
    When I click send I get this...
    PHP Code:
    $name

    Message
    $message

    "); fclose($write);            echo('All done fnx');  ?> 

  9. #19
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    Try this, will send to e-mail:

    PHP Code:
    <?php
    $to_email 
    "[email protected]"// this is the e-mail address the message will be sent to.
    $subject_prefix "Contact"// Example: Will be [Contact] {name}
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html>
        <head>
            <title>Send Message</title>
            <style type="text/css">
                body {
                    font-size: 14px;
                    font-family: Arial;
                }
            </style>
        </head>
        <body>
        
        <?php
        
    if($_GET["action"] == "send") {
            
    $name $_POST["name"];
            
    $message $_POST["message"];
            
            if(empty(
    $name) || empty($message)) {
            
    ?>
            <fieldset>
                <legend>ERROR</legend>
                <p>
                    Both fields are required.
                </p>
            </fieldset>
            <br /><br />
            <?php
            
    } else {
                
    $message nl2br($message); // turns textarea linebreaks into HTML pagebreaks.
                
    $subject "[{$subject_prefix}{$name}"// generates subject.
                
    mail($to_email$subject$message); // sends the e-mail.
                
    ?>
            <fieldset>
                <legend>Sent</legend>
                <p>
                    Your e-mail was sent successfully, thank you.
                </p>
            </fieldset>
            <br /><br />
                <?php
            
    }    
        }
        
    ?>
        
            <form name="send_data" method="post" action="?action=send">
                <fieldset>
                    <legend>Send Data</legend>
                    <table>
                        <tr>
                            <td><label for="name"><strong>Name:</strong></label></td>
                            <td><input type="text" name="name" /></td>
                        </tr>
                        
                        <tr>
                            <td><label for="data"><strong>Message:</strong></label></td>
                            <td><textarea cols="50" rows="5" name="message"></textarea></td>
                        </tr>
                        
                        <tr>
                            <td>&nbsp;</td>
                            <td><input type="submit" value="Send" /></td>
                        </tr>
                        
                    </table>
                </fieldset>
            </form>
        </body>
    </html>

Page 2 of 2 FirstFirst 12

Posting Permissions

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