Help me please how to solved it!

Started on the old forum in April 2012 · view the original in the archive · old links redirect here

5 replies · 416 views · started 14 years ago · 1 min read

4 participants
WapAdda Junior · 25 posts #1
if(!ereg("[a-z]",$name)){return 9;}
$uname=ereg("[a-z,0-9,.-_]",$name);

i use this code, but when user submit reg data the page come Deprecated : Function ereg() is deprecated in how solved this problem?

metulj Super moderator Principal · 1,726 posts #2

WapAdda wrote:

if(!ereg("[a-z]",$name)){return 9;}
$uname=ereg("[a-z,0-9,.-_]",$name);

i use this code, but when user submit reg data the page come Deprecated : Function ereg() is deprecated in how solved this problem?

use

preg_match

🤔

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ノ刀ノイリ!

WapAdda Junior · 25 posts #3

Ok, if i use

if(!preg_match("[a-z]",$name)){return 9;}

it's correct? if not! Plz explain how to use preg_match my code?

metulj Super moderator Principal · 1,726 posts #4

WapAdda wrote: Ok, if i use

if(!preg_match("[a-z]",$name)){return 9;}

it's correct? if not! Plz explain how to use preg_match my code?

tutorials examples

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ノ刀ノイリ!

subzero Super moderator Fellow · 3,954 posts #5
if(!ereg("[a-z]",$name)){return 9;}
$uname=ereg("[a-z,0-9,.-_]",$name); 
if(!preg_match("[a-z]",$name))
{
return 9;
}
$uname=preg_match("[a-z,0-9,.-_]",$name); 

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... _______…

something else Fellow · 2,296 posts #6
if(!preg_match("/[a-z]/",$name))
{
return 9;
}
preg_match("/[a-z,0-9,.-_]/",$name,$matches); 
$uname= $matches[0];

Write your reply now; next you create a free account (or sign in) and it is posted right away. 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