Skip to content

Instantly share code, notes, and snippets.

@gaurish
Created July 10, 2011 19:33
Show Gist options
  • Save gaurish/1074879 to your computer and use it in GitHub Desktop.
Save gaurish/1074879 to your computer and use it in GitHub Desktop.
Mysql PHP - Secure way
<?php
$query = sprintf("SELECT * FROM `User` WHERE UName='%s' AND Pass='%s'",
mysql_real_escape_string($Uname),
mysql_real_escape_string($Pass));
mysql_query($query);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment