jackass1919 Posted February 4, 2010 Report Share Posted February 4, 2010 Sveiki. Varbūt kāds var izpalīdzēt? Errors: Deprecated: Function eregi() is deprecated in E:\wamp\www\site\userinfo.php on line 22 Izmantoju wamp serveri jaunāko versiju. Šeit ir tās rindiņas /* Requested Username error checking */ $req_user = trim($_GET['user']); if(!$req_user || strlen($req_user) == 0 || !eregi("^([0-9a-z])+$", $req_user) || !$database->usernameTaken($req_user)){ die("Username not registered"); } mazliet pameklēju un atradu to pašu problēmu šeit http://forums.oscommerce.com/topic/341025-function-eregi-is-deprecated/ Bet tur tas gadījums atšķiras, bet ir līdzīgs, ja kāds mācētu pārlabot to kodu, cik sapratu uz PHP 5 tas vairs nedarbojas... Žēl ka esmu noobs ar sintakses problēmām :D Quote Link to comment Share on other sites More sharing options...
bobsters Posted February 4, 2010 Report Share Posted February 4, 2010 (edited) /* Requested Username error checking */ $req_user = trim($_GET['user']); if(!$req_user || strlen($req_user) == 0 || !preg_match("^([0-9a-z])+$", $req_user) || !$database->usernameTaken($req_user)){ die("Username not registered"); } vajadzetu iet Edited February 4, 2010 by bobsters Quote Link to comment Share on other sites More sharing options...
bobsters Posted February 4, 2010 Report Share Posted February 4, 2010 (edited) /* Requested Username error checking */ $req_user = trim($_GET['user']); if(!$req_user || strlen($req_user) == 0 || !preg_match("/^[0-9a-z]/+$", $req_user) || !$database->usernameTaken($req_user)){ die("Username not registered"); } pasties pats preg_match() funkciju Edited February 4, 2010 by bobsters Quote Link to comment Share on other sites More sharing options...
2easy Posted February 4, 2010 Report Share Posted February 4, 2010 !preg_match("/^([0-9a-z])+$/", $req_user) || Quote Link to comment Share on other sites More sharing options...
bobsters Posted February 4, 2010 Report Share Posted February 4, 2010 es mazliet pa atru ieliku "/" :( Quote Link to comment Share on other sites More sharing options...
jackass1919 Posted February 4, 2010 Author Report Share Posted February 4, 2010 ooo, beidzot, paldies, viss iet :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.