contact form

I have made an html5 website from a template for my church. My biggest issue is the contact page. I have tried till my fingers bled out trying to figure this out… I have been playing with php, but when I try to make the form work a variety of nonsense has happened, but not sending mail.

This is the website: http://wellspringworshipcenter.us/

I know I have to create a php file to send this form. I know the code should look something like this:

BUT after fighting for hours I am submitting to my ignorance and asking for help.

This is the form code for the website:

                                            <div class="form-group">
                                                <!--<label for="contact_name">Name</label>-->
                                                <input type="text" id="contact_name" class="form-control" placeholder="Name" />
                                            </div>
                                            <div class="form-group">
                                                <!--<label for="contact_email">Email Address</label>-->
                                                <input type="text" id="contact_email" class="form-control" placeholder="Email Address" />
                                            </div>
                                            <div class="form-group">
                                                <!--<label for="contact_message">Message</label>-->
                                                <textarea id="contact_message" class="form-control" rows="7" placeholder="Write a message"></textarea>
                                            </div>
                                            <button type="submit" class="btn btn-primary">Send</button>

                                    </form>

any help I could get would be so greatly appreciated. thanks!!

I think using a good tutorial on the internet would be your best bet.

I did a very quick search and found this: http://www.html-form-guide.com/contact-form/php-contact-form-tutorial.html Remember, I just quickly glanced at it and it looks pretty good, but if it doesn’t by some strange chance I am sure you can find others out there.

try this:

Form:

<form action="submitTEST.php" method="post">
Name:
<input type="text" name="name"><br>
E-mail:
<input type="text" name="email"><br>
Comment:
<textarea name="comments" rows="10" cols="40"></textarea>
<input type="submit" value="Send Email">
</form>

Php File:

[code]

<?php $myemail = "[email protected]"; $subject = "Contact Form Submission"; $name = $_POST['name']; $email = $_POST['email']; $comments = $_POST['comments']; $message =" $name sent you an email with the following comment: $comments $name's email address is : $email"; mail($myemail, $subject, $message); ?>[/code]

its simple but does the job, you can modify it to your liking :slight_smile:

Elaine:)

Sponsor our Newsletter | Privacy Policy | Terms of Service