Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jun 2012
    Posts
    18
    Thanks
    3
    Thanked 0 Times in 0 Posts

    converting deprecated function with eregi()

    Hi all,

    I am trying to resolve a function i ones written with eregi(), but i cann't seem to resolve it with preg_match /i.

    Can someone give me the right way?

    This function needs to secure my DB against anti-injection.

    Thanks in advance.

    PHP Code:
    if (eregi("[a-zA-Z0-9]+"$nickname))
            { 
    $nickname trim(str_replace($verboden''strtolower($nickname))); } else { $nickname HACK; echo "nickname:" .$nickname"<br>"; } 

  • #2

  • #3
    New Coder
    Join Date
    Jun 2012
    Posts
    18
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Thanks that worked.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •