same email cant register (ibwf)

Started on the old forum in September 2010 · view the original in the archive · old links redirect here

22 replies · 1,748 views · started 16 years ago · 1 min read

6 participants
shakil420 Developer · 125 posts #1

hi all wapmasters...have a nice day... i just tried to add a new thing in lavalair register form..when some one try to register it will automatic chek users email address...if they provide unique email then it will succees otherwise it will exit();

here is the php code ///////////

//////////////////ibwf reg page

$dupemail=mysql_fetch_array(mysql_query("SELECT email FROM ibwf_users where email ='$email'"));

if ($_REQUEST['email'] !=$dupemail[0])

{ 
echo"regiter ok";
/////////////register process

}else{

echo"this email is already used try another";
exit();
}

note: i cant run it....what is the problem in this code?? any1 recode it..

////////////////////// /////// // /

khan Lead · 681 posts #2

Try This One:

$email = htmlspecialchars(mysql_real_escape_string($_POST['email']));
$results = mysql_query("select count(*) email from ibwf_user where email = '$email'");
$count = mysql_fetch_assoc($results);
if ($count['email'] > 0) {echo "This Email <b>$email</b> Already Registered.Try Another Valid email.<br>";}else {echo "Register Ok.<br>";}
something else Fellow · 2,296 posts #3

shakil420 wrote: note: i cant run it....what is the problem in this code??

$dupemail=mysql_fetch_array(mysql_query("SELECT email FROM ibwf_users where email ='".htmlspecialchars(mysql_real_escape_string($_REQUEST['email']) ."'"));

khan89 wrote: Try This One:

$email = htmlspecialchars(mysql_real_escape_string($_POST['email']));
$results = mysql_query("select count(*) email from ibwf_user where email = '$email'");
$count = mysql_fetch_assoc($results);
if ($count['email'] > 0) {echo "This Email <b>$email</b> Already Registered.Try Another Valid email.<br>";}else {echo "Register Ok.<br>";}

does it need to be:

$count = mysql_fetch_assoc($results[0]);
subzero Super moderator Fellow · 3,954 posts #4
$email = htmlspecialchars(mysql_real_escape_string($_POST['email']));
$results = mysql_query("select count(*) email from ibwf_user where email = '$email'");
$count = mysql_fetch_assoc($results);
if($email>$count[email])
{
$error = true;
$errmessage = "Same email you can't use it!";
}

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

i_love_php_mysql Junior · 34 posts #5

subzero wrote:

$email = htmlspecialchars(mysql_real_escape_string($_POST['email']));
$results = mysql_query("select count(*) email from ibwf_user where email = '$email'");
$count = mysql_fetch_assoc($results);
if($email>$count)
{
$error = true;
$errmessage = "Same email you can't use it!";
}

how to use it? please share

metulj Super moderator Principal · 1,726 posts #7
$checkemail = mysql_query("SELECT email FROM users WHERE email = '$email'") or die(mysql_error());
$showresultemail = mysql_num_rows($checkemail);
if($showresultemail != 0)
{
echo "<br/>$email <br/>is already in use !<br/><a href=\"registration_page.php\">Try again=></a>";
die(mysql_error());
}
else
{
echo "OK... or whatever...";
}

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

i_love_php_mysql Junior · 34 posts #8

metulj wrote:

$checkemail = mysql_query("SELECT email FROM users WHERE email = '$email'") or die(mysql_error());
$showresultemail = mysql_num_rows($checkemail);
if($showresultemail != 0)
{
echo "<br/>$email <br/>is already in use !<br/><a href=\"registration_page.php\">Try again=></a>";
die(mysql_error());
}
else
{
echo "OK... or whatever...";
}

but lavalair register form not like this? error message show from core.php how to use with lavalair tell please

metulj Super moderator Principal · 1,726 posts #9

i_love_php_mysql wrote: but lavalair register form not like this? error message show from core.php how to use with lavalair tell please

code is meant for general usage... so anyone can modify it for any script...

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

shakil420 Developer · 125 posts #10

@@i_love_php_mysql "how to use it? please share"

/////welll open ur register.php page then add the code .may b its still not clear to u ! explore coding-talk learn more

something else Fellow · 2,296 posts #12

only one minor update to change it to lavalair ??? change: $checkemail = mysql_query("SELECT email FROM users WHERE email = '$email'") or die(mysql_error()); to: $checkemail = mysql_query("SELECT email FROM **ibwf_**users WHERE email = '$email'") or die(mysql_error());

confusing?????

if u still cant get it working there is a pre-scripted one for lavalair somewhere in forum 😛

Added after 8 minutes:

or another alternative if you still cant do it is to open up your database and enter this in your sql box:

ALTER TABLE `ibwf_users` ADD UNIQUE (`email`)
i_love_php_mysql Junior · 34 posts #13

that is a good idea but then how would i print error message using those switch case from core.php and print it on regsiter.php that email already registered etc?

i_love_php_mysql Junior · 34 posts #15

tell the name or how will i know which script? i see soo many i do not know which one to use.

something else Fellow · 2,296 posts #16

ok the topic has been deleted lol however i did find it in googles cache

case 16: //what ever is number
        $errl = "<img src=\"../images/point.gif\" alt=\"!\"/> Email Already in use";
        $ue = "<img src=\"../images/point.gif\" alt=\"!\"/>";
        break;
$emailcheck = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_users WHERE name='".$email."'"));

//then a bit thurther down

}else if($emailcheck[0]>0){
echo registerform(16);//what ever number is
i_love_php_mysql Junior · 34 posts #17

something else wrote: ok the topic has been deleted lol however i did find it in googles cache

case 16: //what ever is number
        $errl = "<img src=\"../images/point.gif\" alt=\"!\"/> Email Already in use";
        $ue = "<img src=\"../images/point.gif\" alt=\"!\"/>";
        break;
$emailcheck = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_users WHERE name='".$email."'"));


//then a bit thurther down

}else if($emailcheck[0]>0){
echo registerform(16);//what ever number is

it still registering same email, guess query wrong?

something else wrote: ok the topic has been deleted lol however i did find it in googles cache

case 16: //what ever is number
        $errl = "<img src=\"../images/point.gif\" alt=\"!\"/> Email Already in use";
        $ue = "<img src=\"../images/point.gif\" alt=\"!\"/>";
        break;
$emailcheck = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_users WHERE name='".$email."'"));


//then a bit thurther down

}else if($emailcheck[0]>0){
echo registerform(16);//what ever number is

it still registering same email, guess query wrong?

i_love_php_mysql Junior · 34 posts #18

still it register whats wrong here

$emailcheck = mysql_fetch_array(mysql_query("SELECT * FROM ibwf_users WHERE email='".$email."'")); }else if($emailcheck[0]>0){ echo registerform(15); }else if(register($uid,$pwd,$usx,$bdy,$ulc,$email, $ubr)==1) { echo registerform(9); }else if(register($uid,$pwd,$usx,$bdy,$ulc,$email, $ubr)==2) {

i_love_php_mysql Junior · 34 posts #20

here bro

echo "</head>\n";
echo "<body>\n";
echo "<center>";
$uid = $_POST["uid"];
$pwd = $_POST["pwd"];
$cpw = $_POST["cpw"];
$usex = $_POST["usex"];
$uloc = $_POST["uloc"];
$bday = $_POST["bday"];
$email = $_POST["email"];
connectdb();
$brws = explode(" ",$_SERVER[HTTP_USER_AGENT] );
$ubr = $brws[0];
$ipr = getip();
$uip = explode(".",$ipr);

echo "<h3 align=\"center\">Fill The Form</h3>\n";

$ipr = getip();
$uip = explode(".",$ipr);

if((!canreg())||(isipbanned($ipr,$ubr)))
{
    echo "<p>";
    echo "<img src=\"../images/notok.gif\" border=\"0\" alt=\"X\"/>Registration is closed at the moment";
    echo "</p>";
}else{
echo "<p>";
?>

<?php
$tolog = false;
if(trim($uid)=="")
{
echo registerform(1);
}else if(trim($pwd)=="")
{
echo registerform(2);
}else if(trim($cpw)=="")
{
echo registerform(3);
}else if(spacesin($uid)||scharin($uid))
{
echo registerform(4);
}else if(spacesin($pwd)||scharin($pwd))
{
echo registerform(5);
}else if($pwd!=$cpw)
{
echo registerform(6);
}else if(strlen($uid)<4)
{
echo registerform(7);
}else if(strlen($pwd)<4)
{
echo registerform(8);
}else if(isdigitf($uid))
{
echo registerform(11);
}else if(checknick($uid)==1)
{
echo registerform(12);

}else if(checknick($uid)==2)
{
echo registerform(13);
}else if($email=="")
{
    echo registerform(14);

}else if(register($uid,$pwd,$usx,$bdy,$ulc,$email, $ubr)==1)
{
echo registerform(9);
}else if(register($uid,$pwd,$usx,$bdy,$ulc,$email, $ubr)==2)
{
echo registerform(10);
}else{

echo "Registration completed successfully!<br/>";
$tolog = true;
}
echo "</p>";
}
echo "<p align=\"center\">";
if($tolog)
{

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close