Search the Community
Showing results for tags 'contact page'.
-
I have created this HTML Contact Page for my website. I have new in HTML but using various website info I managed to create a simple contact page. Now when I click on send button nothing happens. Later I found in search that I need a PHP file to support. I tried many time but nothing happen. Anyone can help me Here is my HTML code: <head> <title>News Contact Page</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <form action="contact.php" method="POST"> <label for="field_name">Your name:</label> <input type="text" id="field_name" name="sender_name"> <br /><br /> <label for="field_email">Your Email Address:</label> <input type="text" id="field_email" name="sender_email"> <br /><br /> <label for="field_phone">Your Mobile Number:</label> <input type="text" id="field_phone" name="sender_phone"> <br /><br /> <label for="field_message">Please Write you Enquire in brief:</label> <textarea id="field_message" name="sender_message"></textarea> <br /><br /> <b><p>Select Why You want to Contact US:</p></b> <input id="radio_1" type="radio" name="radio_group_1" value="shared"> <label for="radio_1">Add New link</label> <br /> <input id="radio_2" type="radio" name="radio_group_1" value="vps"> <label for="radio_2">Report Dead link</label> <br /> <input id="radio_3" type="radio" name="radio_group_1" value="dedicated"> <label for="radio_3">Advertising Price</label> <br /><br /> <b><p>Additional Add New Link Options:</p></b> <label for="field_name">Your Website URL:</label> <input type="text" id="field_url" name="sender_url"> <br /><br /> <label for="field_name">Your Website name:</label> <input type="text" id="field_url" name="sender_url"> <br /><br /> <label for="field_name">Your Website Logo:</label> <form action="index.php" enctype="multipart/form-data"> Select a file to upload: <input type="file" name="selectedfile" /> </form> <b><p>Additional Report Dead Link Options:</p></b> <label for="field_name">Category of Dead Link:</label> <input type="text" id="field_cate" name="sender_cate"> <br /><br /> <label for="field_name">Name of the Dead URL Website:</label> <input type="text" id="field_deadurl" name="sender_deadulr"> <br /><br /> <b><p>Additional Advertising Options:</p></b> <input id="check_1" type="checkbox" name="checkbox_group_1[]" value="privacy"> <label for="check_1">Feature Category Advertising</label> <br /> <input id="check_2" type="checkbox" name="checkbox_group_1[]" value="ssl"> <label for="check_2">Top Banner Advertising</label> <br /> Advertise for: <select name="dropdown"> <option value="1m">1 month</option> <option value="2m">3 months</option> <option value="6m">6 months</option> <option value="1y">1 year</option> </select> <br /><br /> <label for="field_name">Your Website name:</label> <input type="text" id="field_url" name="sender_url"> <br /><br /> <form action="index.php" enctype="multipart/form-data"> Upload your website Logo For Advertising: <input type="file" name="selectedfile" /> </form> <input type="submit" name="send_message" value="Send"> </form> </body> </html>
-
Hello, I am a newbie to php scripting. I have been using Larry Ullman's PHP for the Web (4th edition) to learn scripting and has been useful up to this point. I have been working on a contact page and I cannot get the script to send the email with the information, or at least I am not receiving the email. What am I doing wrong? Here is the script that I have written: <!DOCTYPE html PUBLIC "-//W3C//DTD Xhtml 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http=equiv="Content-Type" Content="text/html; charset=utf-8"/> <title>Email Handle</title> <style type="text/css" media="screen"> .error { color: red' } </style> </head> <body> <?php // Script 1.0 - email_handle.php /* This script receives four values from contact.html: name, email, comments */ // Flag variable to track success: $okay = TRUE; // Set Variables: $name = $_POST['name']; $email = $_POST['email']; $comments = $_POST['comments']; // validate the name and strip tags: if (empty($_POST['name'])) { print '<p class="error">Please enter your name.</p>'; } // validate the email address and strip tags: if (empty($_POST['email'])) { print '<p class="error">Please enter your email address.</p>'; } // Validate email at: if (empty($_POST['email']) || (substr_count($_POST['email'], '@') != 1) ) { $problem = TRUE; print '<p class="error">Please enter a valid email address.</p>'; } // Validate the comment and strip tags: if (empty($_POST['comments'])) { print '<p class="error">Please enter your comments.</p>'; } // Send the email: if ($okay = true) { mail('someone@somewhere.com', '$comments', '$email');} // Print a message: if ($okay) { print '<p>Thank you for your inquiry.</p>'; print '<p>Someone from our organization will get back to you as soon as possible.</p>'; } ?> </html> I have placed a fake email address for now, but when I actually use the script I am using an active email address. Any help would be greatly appreciated.