Thread: Contact Form
View Single Post
12-13-2005, 04:51 AM
#13
DogFaceBoy is offline DogFaceBoy
Status: Senior Member
Join date: May 2005
Location: Sask, Canada
Expertise:
Software:
 
Posts: 911
iTrader: 0 / 0%
 

DogFaceBoy is on a distinguished road

  Old

Code:
<?php
                    $email = $_POST['email'] ;
                    $subject = $_POST['subject'] ;
                    $message = $_POST['message'] ;
                    
                    if (!isset($_POST['name'])) {
                ?>
                <form method="post" action="<?php echo("$php_self"); ?>">
                    Email:<br />
                    <input name="email" type="text" style="margin: 0px 0px 5px 0px;" /><br />
                    Subject:<br />
                    <input name="subject" type="text" style="margin: 0px 0px 5px 0px;" /><br />
                    Message:<br />
                    <textarea name="message" rows="" cols="" style="margin: 0px 0px 5px 0px;"></textarea><br />
                    <input name="send" type="submit" class="submit" value="Send" alt="Send" />
                </form>
                <?php
                    }
                    elseif || empty($email) || empty($subject) || empty($message)) {
                    echo("<p>Please fill out the form completely!</p>");
                    }
                    else {
                    mail("likuidsmoke@gmail.com","$subject","$message","From: $email");
                    echo("<p>Your email has been sent, allow a few days for a response. Thank you!</p>");
                    }
                ?>
Try that.