/    Sign up×
Community /Pin to ProfileBookmark

A way to prevent signup using free email

Is there a way to prevent users signing up using yahoo or hotmail email addresses?

Here is part of my reg. code

[code]
<TD vAlign=top align=left width=”29%” height=26><B>E-Mail Address:</B><BR>&nbsp;</TD>
<TD vAlign=top align=left width=”71%” height=26><input type=”text” size=34 name=frmEmail>
[/code]

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@balloonbuffoonFeb 23.2005 — This is Javascript, not PHP:
<i>
</i>&lt;SCRIPT LANGUAGE="JavaScript"&gt;
&lt;!-- Begin
function stripEmail(Email){
var atsign = Email.substring(0,Email.lastIndexOf('@')+1);

var domain = Email.substring(atsign.length,Email.length+1);

if (domain == "yahoo.com") {
alert('Please use an email address that is not from Yahoo!')
}
else if (domain == "hotmail.com") {
alert('Please use an email address that is not from Hotmail!')
}
}


// End --&gt;
&lt;/SCRIPT&gt;
&lt;form&gt;
E-Mail Address:&lt;br&gt;
&lt;input type="text" size=34 name=frmEmail&gt;&lt;br&gt;
&lt;input type=button value="Validate" onClick="stripEmail(frmEmail.value)"&gt;
&lt;/form&gt;

In your form you would just move the onClick="stripEmail(frmEmail.value)" to the submit button.

-Steve
Copy linkTweet thisAlerts:
@JupacFeb 23.2005 — [font=Trebuchet MS]That will be easy to by pass. [/font]
×

Success!

Help @wvmlt spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.25,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...