Skip to content

Instantly share code, notes, and snippets.

@dongilbert
Created December 18, 2012 12:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dongilbert/4327713 to your computer and use it in GitHub Desktop.
Save dongilbert/4327713 to your computer and use it in GitHub Desktop.
Read this today on a developer thread. I was horrified, but then I realized he was working on his local machine - so no issue there. But, then I read the rest of his email/question, and in his signature, it said "Senior PHP Developer." NNNOOOOOO
<?php
mysql_connect("localhost", "uname", "pass@3") or die(mysql_error());
echo "Connected to MySQL<br />"; // working fine
mysql_select_db("dbname") or die(mysql_error());
echo "Connected to Database"; // working fine
extract($_POST);
$result = mysql_query("SELECT * FROM admin_users WHERE admin_email='" . $user_email .
"' AND password='" . md5($password) . "' AND status=1") or die(mysql_error()); // not working returns null
while($row = mysql_fetch_array( $result )) {
print_r ($row);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment