ereg_*
was marked as obsolete (deprecated) in PHP 5.3. To fix this error, simply switch to preg_match. For example:
ereg("^[a-zA-Z0-9\-_]{3,20}$", $nombre_usuario)
Exchange for:
if (preg_match("/^[a-zA-Z0-9\-_]{3,20}$/", $nombre_usuario)){
----------^ ^-----------
inicio do delimitador fim do delimitador
To fix your code it is necessary to change the ereg in the functions:
- Validamail()
- Shout()
- uc()
Basically what changes is that you forced to put your regex among some delemitador, in case it was /
. Another point is that ereg
is based on the regex of Unix equator preg_*
is in the Perl (see PCRE modifiers).
Would be a Warning, right? You mean in the version of PHP you are using (what is it?), the
ereg
is considered obsolete. You need to use another function, or have php mute warnings.– bfavaretto
How can I do that?
– feliphe felix
So the ideal would be to use
preg_match
instead of theereg
.– bfavaretto
Already used more didn’t work, Could put in the Code? why I don’t know much of php.
– feliphe felix