PDA

View Full Version : Help needed with email verification form.



antonio2
04-16-2007, 02:22 PM
Hi everyone,

I have a form that was working fine, till someone now sending me span by the web contact form.
I want to change the form, so it verifies a good email address by dns.
I have tried a few things but still doesn't work, I would like this to work the best way possible, by php or java script.
Can anyone please help me.

Thanks

//
<form action="thanks.php" method="POST" name="contactform" id="contactform" value="Submit" onsubmit="return formCheck(this);"/>
<table width=500 border=0 align="center">
<tr>
<td valign=top align=right height=30 width="112"></td>
<td valign=top align=right width="31"></td>
<td width=343 valign=top class="bold1 style1"><div align="center" class="style1 style5">
<div align="left" class="style11 credit style19"><strong>Please fill up this form with any questions. </strong></div>
</div></td>
</tr>
<tbody>
<tr>
<td width=112 height=21 align=right class="base"><span class="style21">Name:</span></td>
<td width=31 align=right class="base">&nbsp;</td>
<td width=343 height=21><div align="left" class="style70">
<input name="Name" type="text" size="37">
<strong>*</strong></div></td>
</tr>
<tr>
<td width=112 height=21 align=right class="base"><span class="style21">Company:</span></td>
<td width=31 align=right class="base">&nbsp;</td>
<td width=343 height=21><div align="left" class="style79">
<input name="Company" type="text" size="37">
<span class="style70"><strong>*</strong></span></div></td>
</tr>
<tr>
<td width=112 height=21 align=right class="base"><span class="style21">Address:</span></td>
<td width=31 align=right class="base">&nbsp;</td>
<td width=343 height=21><div align="left" class="style79">
<input name="Address" type="text" size="37">
<span class="style70"><strong>*</strong></span></div></td>
</tr>
<tr>
<td width=112 height=21 align=right class="base"><span class="style21">Telephone:</span></td>
<td width=31 align=right class="base">&nbsp;</td>
<td width=343 height=21><div align="left" class="style79">
<input name="Telephone" type="text" size="37">
<span class="style70"><strong>*</strong></span></div></td>
</tr>
<tr>
<td width=112 height=21 align=right class="base"><span class="style21">Email:</span></td>
<td width=31 align=right class="base">&nbsp;</td>
<td width=343 height=21><div align="left" class="style79">
<input name="myemail" type="text" id="myemail" size="37">
<span class="style70"><strong>*</strong></span></div></td>
</tr>
<tr>
<td width=112 height=25 align=right class="base"><span class="style21">Description:</span></td>
<td width=31 align=right class="base">&nbsp;</td>
<td width=343 height=25><div align="left" class="style79">
<textarea name="Description" type="text" cols="36" rows="6"></textarea>
</div></td>
</tr>
<tr>
<td width=112 height=24 align=right class="base"><span class="style21">Thank You:</span></td>
<td width=31 align=right class="base style1">&nbsp;</td>
<td width=343 height=24><div align="left" class="style78">
<input type="submit" onClick="return checkmail(this.form.myemail)" value="Submit" />
<img src="images/clear.gif" width="25" height="8">
<input name=Reset type=reset class="style48" value=Reset>
</div></td>
</tr>
</tbody>
</table>

\\
//<script type="text/javascript">

/***********************************************
* Email Validation script- Dynamic Drive
***********************************************/

var emailfilter=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i

function checkmail(e){
var returnval=emailfilter.test(e.value)
if (returnval==false){
alert("Please enter a valid email address.")
e.select()
}
return returnval
}

\\</script>

tech_support
04-19-2007, 07:29 AM
Your page is in violation of Dynamic Drive's usage terms (http://www.dynamicdrive.com/notice.htm), which, among other things, states that the credit notice inside script must stay intact. Please reinstate the notice first.