Hello, I got error message in resgitering new members page on my website, Deprecated: Function ereg() is deprecated in .../modules/account/account.inc.php on line 1315 The Code in this line: if(ereg('search', $VAR['_page'])) $arr = $static_var->generate_form('account', 'add', 'search'); else $arr = $static_var->generate_form('account', 'add', 'update'); Code (markup): I know abit about code change to match the new version of PHP, so please can anyone help me updating this line, to get rid of the error message in the front-end. Thanks alot,
Use this function instead of ereg() http://www.php.net/manual/en/function.preg-match.php And see the list of differences when going to PCRE http://www.php.net/manual/en/reference.pcre.pattern.posix.php
if(preg_match('/^search$/', $VAR['_page'])) $arr = $static_var->generate_form('account', 'add', 'search'); else $arr = $static_var->generate_form('account', 'add', 'update'); PHP: Haven't tested but is should work.
Thanks alot for your concern, I have more codes needs to be corrected can you please just let me know how should they be ? [COLOR=#333333][FONT=Bitstream Vera Sans Mono][B]if[/B][/FONT][/COLOR][COLOR=#333333][FONT=Bitstream Vera Sans Mono]([/FONT][/COLOR][COLOR=#008080][FONT=Bitstream Vera Sans Mono]$file_name[/FONT][/COLOR][COLOR=#333333][FONT=Bitstream Vera Sans Mono] [/FONT][/COLOR][COLOR=#333333][FONT=Bitstream Vera Sans Mono][B]!=[/B][/FONT][/COLOR][COLOR=#333333][FONT=Bitstream Vera Sans Mono] [/FONT][/COLOR][COLOR=#DD1144][FONT=Bitstream Vera Sans Mono]'..'[/FONT][/COLOR][COLOR=#333333][FONT=Bitstream Vera Sans Mono] [/FONT][/COLOR][COLOR=#333333][FONT=Bitstream Vera Sans Mono][B]&&[/B][/FONT][/COLOR][COLOR=#333333][FONT=Bitstream Vera Sans Mono] [/FONT][/COLOR][COLOR=#008080][FONT=Bitstream Vera Sans Mono]$file_name[/FONT][/COLOR][COLOR=#333333][FONT=Bitstream Vera Sans Mono] [/FONT][/COLOR][COLOR=#333333][FONT=Bitstream Vera Sans Mono][B]!=[/B][/FONT][/COLOR][COLOR=#333333][FONT=Bitstream Vera Sans Mono] [/FONT][/COLOR][COLOR=#DD1144][FONT=Bitstream Vera Sans Mono]'.'[/FONT][/COLOR][COLOR=#333333][FONT=Bitstream Vera Sans Mono] [/FONT][/COLOR][COLOR=#333333][FONT=Bitstream Vera Sans Mono][B]&&[/B][/FONT][/COLOR][COLOR=#333333][FONT=Bitstream Vera Sans Mono] [/FONT][/COLOR][COLOR=#333333][FONT=Bitstream Vera Sans Mono][B]![/B][/FONT][/COLOR][COLOR=#0086B3][FONT=Bitstream Vera Sans Mono]eregi[/FONT][/COLOR][COLOR=#333333][FONT=Bitstream Vera Sans Mono]([/FONT][/COLOR][COLOR=#DD1144][FONT=Bitstream Vera Sans Mono]"^_"[/FONT][/COLOR][COLOR=#333333][FONT=Bitstream Vera Sans Mono],[/FONT][/COLOR][COLOR=#333333][FONT=Bitstream Vera Sans Mono] [/FONT][/COLOR][COLOR=#008080][FONT=Bitstream Vera Sans Mono]$file_name[/FONT][/COLOR][COLOR=#333333][FONT=Bitstream Vera Sans Mono]))[/FONT][/COLOR] Code (markup): [B]if[/B]([COLOR=#008080]$file_name[/COLOR] [B]!=[/B] [COLOR=#DD1144]'..'[/COLOR] [B]&&[/B] [COLOR=#008080]$file_name[/COLOR] [B]!=[/B] [COLOR=#DD1144]'.'[/COLOR] [B]&&[/B] [B]![/B][COLOR=#0086B3]eregi[/COLOR]([COLOR=#DD1144]"^_"[/COLOR], [COLOR=#008080]$file_name[/COLOR]) ) { [COLOR=#008080]$result[/COLOR][[COLOR=#008080]$count[/COLOR]][[COLOR=#DD1144]'name'[/COLOR]] [B]=[/B] [COLOR=#0086B3]eregi_replace[/COLOR]([COLOR=#DD1144]'.php'[/COLOR], [COLOR=#DD1144]''[/COLOR], [COLOR=#008080]$file_name[/COLOR]); [COLOR=#008080]$result[/COLOR][[COLOR=#008080]$count[/COLOR]][[COLOR=#DD1144]'id'[/COLOR]] [B]=[/B] [COLOR=#008080]$count[/COLOR]; Code (markup): Please Help, Thanks
No-no-no, if you need code correcting work, then you should order it. My help was only to teach and show the correct location, where to fetch information, that is why I supplied the links.