Filltering

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

  • ripkk2tfk
    replied
    Is that all I should use?

    Leave a comment:


  • GumSlone
    replied
    to prevent mysql injection use: mysql_real_escape_string
    PHP: mysql_real_escape_string - Manual

    Leave a comment:


  • ripkk2tfk
    replied
    I want to remove any special characters from username, password to help prevent mysql injection as for the email I need to allow the @ symbol

    Leave a comment:


  • GumSlone
    replied
    no, for what you need the filtering? password or username?

    Leave a comment:


  • ripkk2tfk
    replied
    Ok here is what I got
    PHP Code:
    $text = preg_replace('/[^[:alnum:]\-\.\_\^]/', '', $username);
    if($text == true)
            {
            die ("Unsupported character(s)");
                    } 
    
    Last edited by ripkk2tfk; 09.01.10, 13:14.

    Leave a comment:


  • GumSlone
    replied
    why into if statement?

    Leave a comment:


  • ripkk2tfk
    replied
    How would I put that in an if statment?

    Leave a comment:


  • GumSlone
    replied
    you can try something like this:

    PHP Code:
    $text = preg_replace('/[^[:alnum:]\-\.\_\^]/', '', $text); 
    

    Leave a comment:


  • ripkk2tfk
    started a topic Filltering

    Filltering

    how do I fillter chars like ` & ^ %
Working...
X