Forum Moderators: coopster
var invalidaddress=new Array()
invalidaddress[0]="outgun"
invalidaddress[1]="outblaze"
invalidaddress[2]="fastermail"
//extend or shorten this list if neccessary
var testresults
function checkemail(){
var invalidcheck=0;
var str=document.validation.emailcheck.value
var filter=/^(\w+(?:\.\w+)*)@((?:\w+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
if (filter.test(str)){
var tempstring=str.split("@")
tempstring=tempstring[1].split(".")
for (i=0;i<invalidaddress.length;i++){
if (tempstring[0]==invalidaddress[i])
invalidcheck=1
}
if (invalidcheck!=1)
testresults=true
else{
alert("Oops! That free email address is often used to spam. Please enter another!")
testresults=false
}
}
else{
alert("Please input a valid email address!")
testresults=false
}
return (testresults)
}
The best advice I could give you would be to give it your best effort in PHP and if you get stuck, let us know where your issues are and the folks in this forum will be happy to assist. Please have a look at the PHP Forum Charter [webmasterworld.com] for more information on Posting Guidlines for the PHP Server Side Scripting Forum.