Help me please how to solved it!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Help me please how to solved it!

    PHP Code:
    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?

    #2
    Originally posted by WapAdda View Post
    PHP Code:
    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
    PHP Code:
    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ノ刀ノイリ!

    Comment


      #3
      Ok, if i use
      PHP Code:
      if(!preg_match("[a-z]",$name)){return 9;} 
      it's correct?
      if not! Plz explain how to use preg_match my code?

      Comment


        #4
        Originally posted by WapAdda View Post
        Ok, if i use
        PHP Code:
        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ノ刀ノイリ!

        Comment


          #5
          PHP Code:
          if(!ereg("[a-z]",$name)){return 9;}
          $uname=ereg("[a-z,0-9,.-_]",$name); 
          PHP Code:
          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...
          _______
          Info & Tips
          php.net
          w3schools.com

          Comment


            #6
            PHP Code:
            if(!preg_match("/[a-z]/",$name))
            {
            return 
            9;
            }
            preg_match("/[a-z,0-9,.-_]/",$name,$matches); 
            $uname$matches[0]; 
            Last edited by something else; 13.04.12, 06:32.

            Comment

            Working...
            X