This is becuase eregi() is deprecated in newer versions of PHP, so it's wiser to use the function preg_match because that one will stay around longer...in other words, if you upgrade your php version, eregi() won't work anymore. If you want your php scripts to be flexible and not crash after you updated php, this is the way to go
Bucky, where is this forum???!!! To tell you the truth i can find it on your web page.... i would appreciate it if you could tell me :) btw nice tutotrials :) ^_^
btw correct if statement is: if(!eregi("[^A-Za-z0-9]",$test) ... boston fails to nest his ( and ) right
Ric0tjuh24 1 month ago
@Ric0tjuh24 you have three parentheses, that makes no sense. It goes
if ( !eregi ( "[^A-Za-z0-9]", $test ) )
B1KMusic 3 weeks ago
NOOO for the 10th time, your source code is NOT on the site! shame
Ric0tjuh24 1 month ago
This function has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged.
pkiriakou 1 month ago in playlist PHP Programming Tutorials
Hey. Just wanna say that I think that your code segment is incorrect. The one that checks if the username is alphanumeric.
iceboarderz 8 months ago
great vid
th2 8 months ago
alphanumeric =3
Computerwizgeek920 9 months ago
EXTREMELY IMPORTANT!!! REPLACE the whole !eregi...... function with this,
so the statement looks like:
if(!preg_match('/[^A-Za-z0-9]/i' , $test)){
statements.....
}
SnijdersMax 10 months ago 10
@SnijdersMax can you please explain me why ^^
thank you very much!
lpperalta1 3 months ago
@lpperalta1
This is becuase eregi() is deprecated in newer versions of PHP, so it's wiser to use the function preg_match because that one will stay around longer...in other words, if you upgrade your php version, eregi() won't work anymore. If you want your php scripts to be flexible and not crash after you updated php, this is the way to go
SnijdersMax 3 months ago
@SnijdersMax Thank you so much again
lpperalta1 2 months ago
It took me a long time to figure that out, so i figured i'd just share it here
SnijdersMax 3 months ago
i can't find the source code in your site :(
lezahann 1 year ago 8
Wow on the embarassing part...just wow.
beatboxpeej 1 year ago
awesome but u shouldve just called the variable usernametest
lance182 1 year ago
your voice keeps changing...
coolcam262 1 year ago
@coolcam262 Would be boring if he keeps the same tone for 10 minutes,
just like my teacher.
Niel8181 1 year ago
why let the people click and click and click if errors appears in form.
isn't better to check username availability with ajax on blur? i am sure is much better.
xbugster 1 year ago
@xbugster I also want to warn guys who just learning to not use eregi anymore because is deprecated from php 5.3.0. use preg_match()
xbugster 1 year ago
Bucky, where is this forum???!!! To tell you the truth i can find it on your web page.... i would appreciate it if you could tell me :) btw nice tutotrials :) ^_^
TheEgao 1 year ago
Hi! Great tutorials thanks heaps ...
just a quick comment: the ereg expression is deprecated and removed from recent php versions use preg_match instead
TheTamasPataky 1 year ago
There's an error in the video:
have a look at the position of the first closing bracket.
correct is:
if(!eregi("([^A-Za-z0-9])",$test))
relysaa 1 year ago 4
Comment removed
newzealand38 1 year ago
@relysaa Also. $_POST[username] should be $_POST['username'] if I'm correct.
beatboxpeej 1 year ago 6
your site is off?
HipHop4evahh 2 years ago 4
Awesome work man, it really helped.
remibrandtcom 2 years ago
LOL! "I don't have any thing embarrassing in my history do I?"
Someone has a guilty mind. :).
Zombiedevice 2 years ago 52
@Zombiedevice he's refering to his like 10th php vid where he had uporn in his history lol
Ric0tjuh24 1 month ago
Much.
CrazyMongols 2 years ago
what's the difference between ' and " in PHP?
BackRaw 2 years ago
Great tutorials but when i got to browse website i get following message.
"hey im wokring on this site"
Can anyboy advise please.
nooffending 2 years ago
it means he's working on the site. lol
coolshoos 2 years ago 3
to what site? bucky's site? ^^ he's updated it...
BackRaw 2 years ago
can you show people how to make forum
32penn 2 years ago 2
lol "imberassing" rofl
cdipaolo1996 2 years ago 3
awesome work man.
Thanks for the HQ code willugoupordown
ikknight 2 years ago 2
Add &fmt=18 to the end of the URL in the Address Bar for High Quality.
willugoupordown 2 years ago 2
thanks for the tip man,really helped
saa1168 2 years ago
oo didn't know you had these tutorials, im going to start from 1 :) btw your tutorials are awesome, you make a complete idiot seem somewhat smart :D
gorion79 3 years ago 13
Your PHP tutorials are always welcome.
turxxx 3 years ago 2