Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 8 of 8

Thread: Clean string.

  1. #1
    Join Date
    Dec 2007
    Posts
    1,683
    Tokens
    0

    Latest Awards:

    Default Clean string.

    PHP Code:
    function waffles2($loginstring
    {
        
    $loginstring mysql_escape_string($loginstring);
        
    $loginstring stripslashes($loginstring);
        
    $loginstring htmlentities($loginstring);
        
    $loginstring htmlspecialchars($loginstring);
        
    $loginstring strip_tags($loginstring);
     
        return 
    $loginstring;


    Just to make sure, would that work?
    as I added or die("Error"); and it displayed the error.

    If anybody could, I'd be greatful..
    If anyone could post a securer cleaner function.
    Last edited by Independent; 11-06-2008 at 09:02 PM. Reason: /

  2. #2
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    Quote Originally Posted by Minor View Post
    [php]function waffles2($loginstring)
    {
    $loginstring = mysql_escape_string($loginstring);
    $loginstring = stripslashes($loginstring);
    $loginstring = htmlentities($loginstring);
    $loginstring = htmlspecialchars($loginstring);
    $loginstring = strip_tags($loginstring);

    return $loginstring;
    }
    [\php]

    Just to make sure, would that work?
    as I added or die("Error"); and it displayed the error.

    If anybody could, I'd be greatful..
    If anyone could post a securer cleaner function.
    this is good for cleaning sql:

    PHP Code:
    if( ( function_exists'get_magic_quotes_gpc' ) && get_magic_quotes_gpc( ) ) || ( ini_get'magic_quotes_sybase' ) && ( strtolowerini_get'magic_quotes_sybase' ) ) !== 'off' ) ) )
            {
                
    stripslashes$string );
            }
            
    $string mysql_real_escape_string$string );
            return 
    $string


    visit my internet web site on the internet
    http://dong.engineer/
    it is just videos by bill wurtz videos you have been warned

  3. #3
    Join Date
    Dec 2007
    Posts
    1,683
    Tokens
    0

    Latest Awards:

    Default

    Should I nest it into the function?

  4. #4
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    Quote Originally Posted by Minor View Post
    Should I nest it into the function?
    No that's a function in itself.


    visit my internet web site on the internet
    http://dong.engineer/
    it is just videos by bill wurtz videos you have been warned

  5. #5
    Join Date
    Dec 2007
    Posts
    1,683
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Jewish Bear View Post
    No that's a function in itself.
    Yeah, but can I do that if I wish..

    because, I have waffles2(); all over the site in clean fucntions..

    but I've nested it and it appears it's working, ty.

    I owe you 2rep points.

  6. #6
    Join Date
    Dec 2007
    Posts
    1,683
    Tokens
    0

    Latest Awards:

    Default

    Couldn't edit the post above..

    How do I stop it from displaying the slash?

  7. #7
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    #1 you don't need all that ****, and you need to put Dan's code into a function.

    You remove slashes on display, stripslashes();

  8. #8
    Join Date
    Dec 2007
    Posts
    1,683
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Dentafrice View Post
    #1 you don't need all that ****, and you need to put Dan's code into a function.

    You remove slashes on display, stripslashes();
    ty - I have already.

Posting Permissions

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