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.

PHP Form Question

Featured Replies

Does anyone know how to send the form information from this contact form to an email address once it's passed validation?

 

Form

 

<?php
	include("livevalidationphp.class.php"); // the LiveValidationPHP scripts
	include("rules.inc.php"); // hold the rules
	
	$html="";			
	$frmTestLive=new LiveValidationMassValidatePHP("frmTestLive",$_POST);
	$frmTestLive->addRules($formRules["frmTestLive"]);						
	$html=$frmTestLive->generateAll();

	// check for a post action
	$frmTestErrors=array();
	if(isSet($_POST["action"]))
	{
		if($_POST["action"]=="send_test_form")
		{
			$frmTestErrors=$frmTestLive->validate();
		}
	}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>

	</head>

	<body>

	<?php
		if(count($frmTestErrors)>0)
		{
			print "<strong>You have errors:</strong>";
			print "<pre>";
			print_r($frmTestErrors);
			print "</pre>";
		}
	?>
	
    <form name='frmTest' id='frmTest' action='' method='post'>
    
        <input type='hidden' name='action' value='send_test_form'>

            <input type='text' name='element_1' id='element_1' value='' placeholder='Name'>

            <input type='text' name='element_2' id='element_2' value='' placeholder='Email'>

            <input type='text' name='element_3' id='element_3' value='' placeholder='Message'>

            <input type='submit' value='go'>
        
    </form>

	</body>
</html>

 

Validaton etc...

 

http://pastebin.com/raw.php?i=24vA5RZh

 

Can't seem to find how to send the information to an email once the forms valid? Anyone have any ideas?

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.