SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru
    Join Date
    Oct 2004
    Location
    uk
    Posts
    853
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to test mysql_real_escape_string()

    Hi guys

    I want to make sure my site is secure

    Is there a way i can test my site using mysql_real_escape_string() to prevent sql injection?

  2. #2
    SitePoint Addict Wildhoney's Avatar
    Join Date
    Apr 2006
    Location
    Nottingham
    Posts
    246
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Print out the results of your query.

    PHP Code:
    $szSQL sprintf("SELECT myColumn1 FROM myTable WHERE myColumn2 = '%s'"mysql_real_escape_string($myData));
    var_dump($szSQL); 
    TalkPHP.com - The Friendly PHP Community

    Watch Reaper Online - Watch Chuck Online


Bookmarks

Posting Permissions

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