Jump to content

Search the Community

Showing results for tags 'contact'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Found 6 results

  1. Martin54

    Contact Form.

    Hello I'm using one of w3 schools responsive templates to build my site. I've put in a contact form but I'm not sure if it's responding correctly? An e mail box does pop up but no name of sender or email address of sender, nor any message. I've attached screen shots, if anyone can confirm where I'm going wrong that would be much appreciated. Many Thanks Martin
  2. Hi, i am new to the PHP scene and am having trouble getting this PHP code i found to work. I found it here:http://www.inmotionhosting.com/support/edu/website-design/using-php-and-mysql/how-to-create-a-custom-php-contact-form <!doctype html><html><head><meta charset="utf-8"><title>Untitled Document</title></head> <body><?php if (isset($_REQUEST['submitted'])) {// Initialize error array. $errors = array(); // Check for a proper First name if (!empty($_REQUEST['firstname'])) { $firstname = $_REQUEST['firstname']; $pattern = "/^[a-zA-Z0-9_]{2,20}/";// This is a regular expression that checks if the name is valid characters if (preg_match($pattern,$firstname)){ $firstname = $_REQUEST['firstname'];} else{ $errors[] = 'Your Name can only contain _, 1-9, A-Z or a-z 2-20 long.';} } else {$errors[] = 'You forgot to enter your First Name.';} // Check for a proper Last name if (!empty($_REQUEST['lastname'])) { $lastname = $_REQUEST['lastname']; $pattern = "/^[a-zA-Z0-9_]{2,20}/";// This is a regular expression that checks if the name is valid characters if (preg_match($pattern,$lastname)){ $lastname = $_REQUEST['lastname'];} else{ $errors[] = 'Your Name can only contain _, 1-9, A-Z or a-z 2-20 long.';} } else {$errors[] = 'You forgot to enter your Last Name.';} //Check for a valid phone number if (!empty($_REQUEST['phone'])) { $phone = $_REQUEST['phone']; $pattern = "/^[0-9_]{7,20}/"; if (preg_match($pattern,$phone)){ $phone = $_REQUEST['phone'];} else{ $errors[] = 'Your Phone number can only be numbers.';} } else {$errors[] = 'You forgot to enter your Phone number.';} if (!empty($_REQUEST['redmapleacer']) || !empty($_REQUEST['chinesepistache']) || !empty($_REQUEST['raywoodash'])) { $check1 = $_REQUEST['redmapleacer']; if (empty($check1)){$check1 = 'Unchecked';}else{$check1 = 'Checked';} $check2 = $_REQUEST['chinesepistache']; if (empty($check2)){$check2 = 'Unchecked';}else{$check2 = 'Checked';} $check3 = $_REQUEST['raywoodash']; if (empty($check3)){$check3 = 'Unchecked';}else{$check3 = 'Checked';} } else {$errors[] = 'You forgot to enter your Phone number.';} } //End of validation if (empty($errors)) { $from = "From: Our Site!"; //Site name // Change this to your email address you want to form sent to $to = "your@email.com"; $subject = "Admin - Our Site! Comment from " . $name . ""; $message = "Message from " . $firstname . " " . $lastname . " Phone: " . $phone . " Red Maple Acer: " . $check1 ." Chinese Pistache: " . $check2 ." Raywood Ash: " . $check3 .""; mail($to,$subject,$message,$from); }?> <!--Error Reporting Code--><?php //Print Errors if (isset($_REQUEST['submitted'])) { // Print any error messages. if (!empty($errors)) { echo '<hr /><h3>The following occurred:</h3><ul>'; // Print each error. foreach ($errors as $msg) { echo '<li>'. $msg . '</li>';} echo '</ul><h3>Your mail could not be sent due to input errors.</h3><hr />';} else{echo '<hr /><h3 align="center">Your mail was sent. Thank you!</h3><hr /><p>Below is the message that you sent.</p>'; echo "Message from " . $firstname . " " . $lastname . " <br />Phone: ".$phone." <br />"; echo "<br />Red Maple Acer: " . $check3 . ""; echo "<br />Chinese Pistache: " . $check2 . ""; echo "<br />Raywood Ash: " . $check3 . ""; } }//End of errors array ?> <h2>Contact us</h2> <p>Fill out the form below.</p> <form action="" method="post"> <label>First Name: <br /> <input name="firstname" type="text" value="- Enter First Name -" /><br /></label> <label>Last Name: <br /> <input name="lastname" type="text" value="- Enter Last Name -" /><br /></label> <label>Phone Number: <br /> <input name="phone" type="text" value="- Enter Phone Number -" /><br /></label> <label>Red Maple Acer: <input name="redmapleacer" type="checkbox" value="Red Maple Acer" /><br /></label> <label>Chinese Pistache: <input name="chinesepistache" type="checkbox" value="Chinese Pistache" /><br /></label> <label>Raywood Ash: <input name="raywoodash" type="checkbox" value="Raywood Ash" /><br /></label> <input name="" type="reset" value="Reset Form" /><input name="submitted" type="submit" value="Submit" /> </form> </body></html> I get an issue with the phone number check could someone give me an idea of whats wrong? Thanks Simon Lehmann
  3. Hi all i am setting up a web site for my photography business and i cant get the contact form working at all i am at the point where i wanna give up. The site is www.egphoto-designs.com/test2. here is the code. contacts.html please help me i need this site up an running today or tomorrow. if there is code missing i will post it when needed. I am ignorant and uneducated on making web sites. thanks all <!DOCTYPE html><html lang="en"><head> <title>Contacts</title> <meta charset="utf-8"> <link rel="stylesheet" type="text/css" media="screen" href="css/reset.css"> <link rel="stylesheet" type="text/css" media="screen" href="css/style.css"> <link href='http://fonts.googleapis.com/css?family=Cabin+Sketch:400,700' rel='stylesheet' type='text/css'> <script src="js/jquery-1.7.min.js"></script> <script src="js/jquery.easing.1.3.js"></script> <!--[if lt IE 8]> <div style=' clear: both; text-align:center; position: relative;'> <a href="http://windows.microsoft.com/en-US/internet-explorer/products/ie/home?ocid=ie6_countdown_bannercode"> <img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today." /> </a> </div> <![endif]--> <!--[if lt IE 9]> <script type="text/javascript" src="js/html5.js"></script> <link rel="stylesheet" type="text/css" media="screen" href="css/ie.css"> <![endif]--></head><body> <!--==============================header=================================--> <div class="header"> <div> <div class="subpages-nav"> <nav> <ul class="menu"> <li class="li-none"><a href="index.html">Home</a></li> <li><a href="about.html">About</a></li> <li><a href="portfolio.html">Portfolio</a></li> <li class="li-left li-none"><a href="services.html">Services</a></li> <li><a href="news.html">News</a></li> <li class="current"><a href="contacts.html">Contacts</a></li> </ul> <h1><a href="index.html"><img src="images/logo.png" alt=""></a></h1> </nav> </div> </div> </div> <!--==============================content================================--> <section id="content"><div class="ic"></div> <div class="pad-1"> <div class="page6-row1"> <div class="col-14"> <h2 class="h2">Contact info:</h2> <dl> <dt class="clr-1"><strong >Edward Garrity</strong><br>Miyako-Machi Isesaki-Shi Gunma-Ken</dt> <dd><span>Telephone:</span>080-5927-9523</dd> <dd class="p3"><span>Email:</span><a href="edgarrity@egphoto-designs.com" class="link">edgarrity@egphoto-designs.com</a></dd> </dl> </div> <div class="col-15"> <h2 class="h2 p2">Location:</h2> <div class="map img-border"> <iframe src="https://www.google.com/maps/embed?pb=!1m14!1m12!1m3!1d3214.2982175679035!2d139.1519203999994!3d36.32932161266572!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!5e0!3m2!1sen!2s!4v1400935436334" width="600" height="450" frameborder="0" style="border:0"></iframe> </div> </div> <div class="col-16"> <h2 class="h2 p2">Contact form:</h2> <form id="form" action="contacts.php" method="post" > <fieldset> <label><input type="text" name="sender_name" value="Full Name" onBlur="if(this.value=='') this.value='Full Name'" onFocus="if(this.value =='Full Name' ) this.value=''"></label> <label><input type="text" name="sender_email"value="Email" onBlur="if(this.value=='') this.value='Email'" onFocus="if(this.value =='Email' ) this.value=''"></label> <label><textarea name="sender_message" onBlur="if(this.value==''){this.value='Message'}" onFocus="if(this.value=='Message'){this.value=''}">Message</textarea></label> <div class="btns"><a href="#" class="link-1">Clear</a><a href="index.html" class="link-1" onClick="send">Send</a></div> </fieldset> </form> </div> </div> </div> </section> <!--==============================footer=================================--> <footer> <span><strong>© 2014 EG Photo & Designs</strong><br><span> </footer> </body></html>
  4. I have been using a contact form made from the website http://www.emailmeform.com/ and I think after making the rest of my site very very nice looking in my eye this is the only bit that detracts its value as the form sends you to a page advertising there product before back to my website. Is there a better form that can hide my email and have captcha on it to prevent spam?
  5. I've been working with php for a short time and picked this form up online to use for my contact page. When tested on my server, http://www.d1082919....h/contact2.html the text fields return all of the correct content (email, name, phone, etc.) to me in an email. When I put the site live, http://vitalhabitats.com/contact2.html the text fields all return blank. I still receive the email, but it looks like this: Email:Name:Phone Number:Comments:Newsletter: I cannot understand what the potential issue may be. I know the form works, just not on this server. My php file is attached for review. Any help is greatly appreciated. contactformprocess.php
  6. My php contact form wont send the emails to my account?This is my contact from page<table width="400" border="0" align="center" cellpadding="3" cellspacing="1"><tr><td><h2><strong>Contact Form </strong></h2></td></tr></table><table width="400" border="0" align="center" cellpadding="0" cellspacing="1"><tr><td><form name="form1" method="post" action="send_contact.php"><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td width="16%">Subject</td><td width="2%">:</td><td width="82%"><input name="subject" type="text" id="subject" size="50"></td></tr><tr><td>Detail</td><td>:</td><td><textarea name="detail" cols="50" rows="4" id="detail"></textarea></td></tr><tr><td>Name</td><td>:</td><td><input name="name" type="text" id="name" size="50"></td></tr><tr><td>Email</td><td>:</td><td><input name="customer_mail" type="text" id="customer_mail" size="50"></td></tr><tr><td> </td><td> </td><td><input type="submit" name="Submit" value="Submit"> <input type="reset" name="Submit2" value="Reset"></td></tr></table></form></td></tr></table><p> </p></form>This is my php code for the contact form<?php// Contact subject$subject ="$subject"; // Details$message="$detail";// Mail of sender$mail_from="$customer_mail"; // From $header="from: $name <$mail_from>";// Enter your email address$to ='gareth.joynt@go.edgehill.ac.uk';$send_contact=mail($to,$subject,$messa…// Check, if message sent to your email // display message "We've recived your information"if($send_contact){echo "We've recived your contact information";}else {echo "ERROR";}?>Please help thanks
  • Create New...