Ad block is installed and active. Please support us by disabling it.
HomeSunday, November 19, 2017, 14:13:07

Process Form Data with Jquery

Tuesday, February 10, 15, 00:54:32, 3 Yaers Ago Via wain, Hits: 3010
jQuery, Process form data

<script type="text/javascript" src="js/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.14.custom.min.js"></script>
<script type="text/javascript">
var jname=$("#jname").val();
var jemail=$("#jemail").val();
var jfeed=$("#jfeed").val();
//.html(data), Get the HTML contents of the
//first element in the set of matched elements.
//Drops the element away or shows it by dropping it in.
.show('drop', { direction: 'left' }, 250);
<div align="center">
<div id="effect" align="center">
<div><h4>Contact Us</h4></div>
Name:<br /><input type="text" id="jname" name="jname"><br />
Email:<br /><input type="text" id="jemail" name="jemail"><br />
Message:<br /><textarea name="jfeed" id="jfeed" rows="8" cols="25"></textarea><br />
<a href="javascript:submit();" id="start" class="send">Contact Us</a>
<div id="loadc"></div>


$email = '';
$jname = $_POST['jname'];
$jemail = $_POST['jemail'];
$jfeed = $_POST['jfeed'];
$name = array($jname, $jemail, $jfeed);
foreach ($name as $name) {
if (preg_match("/</", $name)) {
echo "<center><div id=\"toprow\">Invalid Characters \"<\" HTML is not allowed";
if (strlen($name) < 5) {
echo "Field must be at least 3 characters long";die();
if (strlen($name) > 80) {
echo "Max Characters Field: 80";die();
if (!preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/", $jemail)) {
echo "Should be Valid email address.";
$time = date("h:i A");
$date = date("l, F jS, Y");
$headers = 'From: System Admin';
$subject = "Info";
$bodys = "Message:\n\n$jfeed\n\nContact Us Form\n\n$date at $time.\n\n
IP Address.$ip \n\nE Address: $jemail\n\nName: $jname \n\n";
mail($email, $subject, $bodys, "From: $email");
echo "Thank You.";

Sign In



Sitemap Website Sitemap

PHP Form Validation

PHP form validation :: PHP tutorial, requirement(s): PHP Server

Adsense crawler errors and robots.txt

How to fix Google AdSense crawler errors in robots.txt


Session_start creates a session or resumes the current one based on a session identifier passed via a GET or POST request, or passed via a cookie.

PHP imagecreate

imagecreate() returns an image identifier representing a blank image of specified size.


Publishing MySQL data in RSS

Filter Words in PHP - PHP Tutorial

Filter bad words in PHP, requirement(s): PHP server

Preg_Match - PHP Form Validation

PHP form validation with preg_match

PHP Write to File

PHP Write to File :: PHP Tutorial, requirement(s): PHP server

Captcha V2 - Free PHP Script

PHP Captcha protection image Version 2, - Requirement(s): PHP Server, GD Library
About Author


Date Registered: Sun, Feb 8, 15
Last Time Online: Thu, Jun 15, 17
So far has created 115 entries.
This author has not yet filled in any details.