How To Validate Check Email Address Is Correct In Forms When Submit PHP


How To Validate Check Email Address Is Correct In Forms When Submit PHP
  Forums Index
      » Javascipt Forums
        » » How To Validate Check Email Address is Correct In Forms When Submit PHP



How To Validate Check Email Address Is Correct In Forms When Submit PHP
Post Description:
Post Tags: how, to, validate, check, email, address, is, correct, in, forms, when, submit, php, javascript programming, codes, free technical assistance, support and help
This Post Has Been Viewed 5607 Times Since Tue Dec 19, 2006 9:07 pm Posted By webmaster with 4 replies
How To Validate Check Email Address Is Correct In Forms When Submit PHP
one of the best way to communicate with visitors and user is to provide a form. One of the most popular forms is the contact us forms. One of the essential fields to ask a user is for their email address. However, there are many people who just put garbage and not a real email address and you end up with spam or fake people's email address.

One way to confirm that users put a valid email address is with javascript, in my example if the user does not enter a vallid email address, they will received a popup window telling them that the email address they provided is not correct and to try again.

this post is sponsed by www.webune.com
post picture


To teach you how to follow this step by step tutorial guide, start by opening you text editor and copy and paste the following code into your notepad:


     Code:
<HTML>
<TITLE>Javascript Script Tutorial Check Email Address On Forms when submitted</TITLE>
<HEAD>
<script language="JavaScript1.2">
var find_result
function form_email(){
var str=document.validation.email_address.value
var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
if (filter.test(str))
find_result=true
else{
alert("ERROR: Please enter a valid Email Address!")
find_result=false
}
return (find_result)
}
</script>

<script>
function checkbae(){
if (document.layers||document.getElementById||document.all)
return form_email()
else
return true
}
</script>
</HEAD>
<style type="text/css">
<!--
.style2 {color: #0066FF}
.style3 {
color: #009933;
font-weight: bold;
}
.style5 {color: #0066FF; font-weight: bold; }
-->
</style>
<BODY>
<strong>Javascript Script Tutorial Check Email Address On Forms when submitted
</strong>
<? if($_POST[submit]){ ?>
<h1 align="center" class="style2">Congratulations: <span class="style3"><?php echo $_POST[email_address]; ?></span> is a valid Email</h1> <? }
else {?>
<br /><br /><br /><br /><form name="validation" onSubmit="return checkbae()" method="post">
<table border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#999999">
<tr>
<td bgcolor="#FFFFFF">Please enter a valid email address:<br></td>
<td bgcolor="#FFFFFF"><input type="text" size=18 name="email_address"></td>
</tr>
<tr align="center">
<td bgcolor="#FFFFFF">(example: email@domain.com)</td>
<td bgcolor="#FFFFFF"><input type="submit" name="submit" value="Submit"></td>
</tr>
</table>

</form>
<?php } ?>
<br />
<span class="style3">NOTE</span>: you must have javascript enabled in your browser for this to work, if you want to know how to enable javascript in your browser, <a href="http://www.wallpaperama.com/forums/show-me-how-to-enable-javascript-in-firefox-browser-t43.html">CLICK HERE </a><br /><br />
<div align="center">Turotial by <a href="http://www.wallpaperama.com">Wallpaperama.com</a></div>
<hr size="2" noshade>
<p>This Script is provided by <span class="style5">Wallpaperama.com</span> - Support us by telling your friends about wallpaperama and help contribut to the open source by adding your knowledge of PHP, Linux, Mysql and more to others, just like this script.</p>
<p>Thank You</p>
<p class="style3">Wallpaperama Team</p>
<p><a href="http://www.wallpaperama.com/forums">&lt;&lt; Go Back</a> </p>
<p align="center">PHP Hosting by <a href="http://www.webune.com">Webune.com</a> </p>
<p>
</BODY>
</HTML>


now save your file to whatever you want, i will be saving it as: javascript-valid-email

upload to your website and open it with your browser to see how it works

Our friends at www.webune.com have provided us with php hosting to show you a demo of how it would look like on your website:

CLICK HERE FOR SEE DEMO by Webune.com

if you own your website, and you have benefited or learned from this simple tutorial, we would like to ask you put our link in your site, or to exchange links with us.

Thank you

Wallpaperama Team

Leave Your Comments
* Your Name

  * Your Email Address (Will Not Be Published)

* Your Comments


Add Picture To Comments
Yes No             upload
Receive Replies on my Comments
(An email will be sent to you when someone replies to your comments)

     




Comments and replies About How To Validate Check Email Address Is Correct In Forms When Submit PHP






:: 1 :: #2187 - Reply By John Elder On Tue May 01, 2007 7:50 pm
LIKE many people, I get about a dozen emails a day bearing news good and bad. The bad is that my penis is too small, too soft and lacking the endurance to satisfy a fruit fly. The good is I can build a longer, stronger and everlasting erection for a few hundred dollars — by taking miracle pills.
Example: "Get ready to be stopped by women in the street. Your entire image will emanate increased size! This is what you to Jack's magic beans, except penis-enlargement pills don't work so spectacularly. To get the extra always needed to lead a happier, more fulfilling life."
What's being promised is akin inches requires at least a six-month commitment. But the pills need to be taken with an out loud to reinforce the commitment that will lead to your ultimate success." exercise program — "jelqing" — including drills similar to stretching hamstrings before jogging. To see what it takes to become a Mr Big, go to enlargepenisguide.com. You'll find a nude man, a fairly happy man one imagines, pretending to be a clock, with what appears to be a baby's arm grafted to his pubic bone as the minute hand.
By the time I found this impressive fellow, I'd already paid $106 for a month's supply of SizePro (chosen because of its professional-sounding name) and followed these instructions: "Type your name, the number of inches you want to gain, and the reason(s) you want to gain those inches in the blanks below. And read the completed statement
And so my colleagues heard me pledge earnestly: "I, John Elder, have decided I want to gain two inches in length and one inch in girth (I felt modest ambition would minimise disappointment). My reasons are vanity. And I'm committed to a good penis-pill system until I reach my desired gains."
If I hadn't made this pledge, I could have abandoned the project — particularly after spotting Mr Baby Arm, whom I presume is also trying to improve himself. And that's the rub. If you're born with one of these ridiculous organs, there are times when just about every man feels short-changed.
The average size of an erect penis is about 15.24 centimetres — six inches in the old money. (When talking about penis size, it's traditional to use inches.) The sad thing is it seems there are many men living fretfully with a ruler in one hand and a world of hope in the other. To meet some of these people, return to http://enlargepenisguide.com — and log on to the "progress reports" forum. You'll find men apparently taking the pills, diligently jelqing (stretching a flaccid penis) and sharing how it's hanging. Like Nicky: "I'm 21, and, measured from the pelvic bone, the length of my penis is around 7.5 inches, but I've always wanted to be large like a porn star. I've been doing the exercise a few days now …"
Occasionally, someone claims spectacular results. The simple reason is that the pills — herbal aphrodisiacs, not muscle-building proteins — give little more than an illusion of growth by concentrating blood in the otherwise shrivelled underbelly. But the real joke is that the more anxious one becomes about penis size, the more it is likely to shrink.
"The curious thing about our society, most of the time we pretend that the penis doesn't shrink," says David Mitchell, a doctor and a medical anthropologist. "In fact, the penis doesn't have a set flaccid size. It's actually meaningless to measure the size of the penis because it varies from minute to minute according to the temperature and one's state of mind. The trouble is, if you get anxious, it only makes it smaller, to the point where it can disappear … of these attacks — known as "shrinking penis disease" — on the Indonesian island of Flores, where black magic is widely practised. In these instances, the sufferer believes he will die if his penis disappears. The last outbreak in a modern society occurred in Singapore in 1962, following a rumour that eating pork vaccinated against swine fever would cause shrinking penis disease.
"There were people rushing through the streets holding their penises … some of them using chopsticks," Dr Mitchell says. "As soon as they hit the hospital and started to relax, they came back to normal."
Dr Mitchell says the disease could re-emerge in the Western world. "It could come back again in our society if someone spread the right stories around," he says.
Chris Fox, of La Trobe University, is doing a PhD on penis size and its role in body image. So far, he has interviewed 15 men aged 20 to 75. "The short answer is that every man at some point in his life worries about the size of his penis," Mr Fox says. "If we don't like our penis we won't enjoy sex. For people with a pathological issue with penis size, it will affect their sex life.
"In some cases it will affect how they behave around other men. And one has to remember that most people make their comparison with a flaccid penis — at the urinal or in a change room. The only erections we tend to see are the very big penises on porn stars … and my interview subjects didn't feel threatened by these giant penises because they felt they weren't real. It's in the real world that anxiety takes root."in cases where anxiety spirals into a panic attack."
Dr Mitchell has researched a recent outbreak.
:: 2 :: #26446 - Reply By sdasd On Sat Nov 03, 2007 8:10 am
asdasdasdfasfasdfasdfasdfasdfasdfdsdfasdfsa
:: 3 :: #31365 - Reply By dr. mayo On Tue Dec 11, 2007 8:27 pm
yes,penis size vary from person to person,i aumengted two inches with the device that is promoted at the site below,just go there and get a lot of info about the best penis enlargement device,get a free ebook and reports1.

penisenlargementforsmallpenis /index.php
:: 4 :: #48229 - Reply By John Elder On Tue Apr 01, 2008 7:00 pm
who in the hell is john elder, i want to know how to band user and visitors from a website because they are always providing bad emails