Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

contact form auto responder

Featured Replies

here is my contact form ... i want when people press the submit a mail goes their email adress, mean auto responder

 

<div class="cntct"><form action="contact.php" method="post" id="contactform">
           <ol>
             <li>
               <label for="name">your name <span class="red">*</span></label>
               <input id="name" name="name" class="text" />
             </li>
             <li>
               <label for="email">Your email <span class="red">*</span></label>
               <input id="email" name="email" class="text" />
             </li>
             <li>
               <label for="company">Company Name</label>
               <input id="company" name="company" class="text" />
             </li>
             <li>
               <label for="subject">Subject</label>
               <input id="subject" name="subject" class="text" />
             </li>
             <li>
               <label for="message">Message <span class="red">*</span></label>
               <textarea id="message" name="message" rows="6" cols="50"></textarea>
             </li>
             <li class="buttons">
               <input type="image" name="imageField" id="imageField" src="images/but_send_message.gif" />
             </li>
           </ol>
         </form></div>
     </div>

 

<?php

if(!$_POST) exit;

$email = $_POST['email'];


//$error[] = preg_match('/\b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i', $_POST['email']) ? '' : 'INVALID EMAIL ADDRESS';
if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email )){
$error.="Invalid email address entered";
$errors=1;
}
if($errors==1) echo $error;
else{
$values = array ('name','email','message');
$required = array('name','email','message');

$your_email = "info@bentechgroup.com";
$email_subject = "New Message: ".$_POST['subject'];
$email_content = "new message:\n";

foreach($values as $key => $value){
  if(in_array($value,$required)){
	if ($key != 'subject' && $key != 'company') {
	  if( empty($_POST[$value]) ) { echo 'PLEASE FILL IN REQUIRED FIELDS'; exit; }
	}
	$email_content .= $value.': '.$_POST[$value]."\n";
  }
}

if(@mail($your_email,$email_subject,$email_content)) {
	echo 'Message sent!'; 
} else {
	echo 'ERROR!';
}
}
?>

 

can any one help on this issue?

- All you need to do is ask the user for their email address and use php's standard mail() function to fire one off.

Edited by KieranA

  • Author

But how to do this??? :(

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.