Let me preface this by saying that I am not a coder. I'm a graphic designer that does some web design once in awhile. I recently had a client tell me she's not been receiving her emails through her contact form on her website: http://diamondgirlsbartenders.com/contact.html
Her email is working fine and she can send and receive them without problem, so I'm thinking the problem is with the form - or the PHP used to submit the form data.
Here is my HTML code:
Expand|Select|Wrap|Line Numbers
- <div id="formImage"><img src="http://bytes.com/images/contactcollage.jpg" /></div>
- <div id="stylized">
- <form id="form" name="form" method="post"
- action="mail.php">
- <label for="event">Event Type:</label>
- <input type="text" name="event" tabindex="1" />
- <label for="name">Your Name:</label>
- <input type="text" name="name" tabindex="2" />
- <label for="email">Email Address:</label>
- <input type="text" name="email" tabindex="3" />
- <label for="phone">Phone Number:</label>
- <input type="text" name="phone" tabindex="4" />
- <label for="comments">Comments:</label>
- <textarea name="comments" rows="10" cols="25" tabindex="5"></textarea>
- <button type="submit" value="Send" tabindex="6">Submit</button>
- </form><!-- end of contact form -->
- </div><!-- end of stylized div -->
Here is my PHP code (simple I know but it used to work!):
Expand|Select|Wrap|Line Numbers
- <?php
- $nameField = $_POST['event'];
- $nameField = $_POST['name'];
- $emailField = $_POST['email'];
- $phoneField = $_POST['phone'];
- $messageField = $_POST['comments'];
- $formcontent=" From: $name \n Phone: $phone \n Comments: $message";
- $recipient = "mary.rodriguez@diamondgirlsbartenders.com";
- $subject = $_POST['event'];
- $mailheader = "From: $email \r\n";
- mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
- echo "Thank You! We Will Contact You Soon!" . " -" . "<a href='index.html' style='text-decoration:none;color:#ff99cc;'> Return Home</a>";
- ?>
I would appreciate any assistance.
Thank you,
Toni