How to add more then one Anti Sql

Results 1 to 5 of 5
  1. #1
    Account Upgraded | Title Enabled! rhys918 is offline
    MemberRank
    Apr 2009 Join Date
    EnglandLocation
    377Posts

    How to add more then one Anti Sql

    When you add the anti sql Function/Scipt is you have on the post antisql($_POST that are you ok but then if you add another anti sql scipt what do you do to antisql($_POST just leave or what becasue i dont think it works when i add 2 i only think one does help me please


  2. #2
    Account Upgraded | Title Enabled! Guy is offline
    MemberRank
    Apr 2009 Join Date
    919Posts

    Re: How to add more then one Anti Sql

    You should only need sanitize data with one function call; but, if you want to wrap something twice (Pointless), then:

    Code:
    function2( antisql( $_POST['user'] ) );

  3. #3
    Account Upgraded | Title Enabled! rhys918 is offline
    MemberRank
    Apr 2009 Join Date
    EnglandLocation
    377Posts

    Re: How to add more then one Anti Sql

    Quote Originally Posted by gWX0 View Post
    You should only need sanitize data with one function call; but, if you want to wrap something twice (Pointless), then:

    Code:
    function2( antisql( $_POST['user'] ) );
    can you show me how to by the way its P-Team who hacks me for no reason

  4. #4
    DRGunZ 2 Creator wesman2232 is offline
    MemberRank
    Jan 2007 Join Date
    Erie, PALocation
    4,872Posts

    Re: How to add more then one Anti Sql

    can't you just put it in the same function as another "$sql=" ?

  5. #5
    Account Upgraded | Title Enabled! Guy is offline
    MemberRank
    Apr 2009 Join Date
    919Posts

    Re: How to add more then one Anti Sql

    Quote Originally Posted by rhys918 View Post
    can you show me how to by the way its P-Team who hacks me for no reason
    Sigh, just use this function:

    Code:
      function antisql( $data )
      {
        $data = str_replace( "'", "''", $data );
        $data = htmlentities( $data );
        return( $data );
      }
    XSS and SQL injection, for the most part, isn't possible in this setup; unless your queries don't use quotes (I haven't seen anyone do that yet, as it's pointless), or unless you take data from the database and enter that as an attribute in an HTML tag, and said data is modifiable by the user, then you're safe.



Advertisement