Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Can anyone help me figure out the meaning of this php error message? [closed]
- $con = mysql_connect("localhost", "root", '');
- if (!$con) {
- die('Cannot make a connection');
- }
- mysql_select_db('yumbox_table', $con) or die('Cannot make a connection');
- isset($_POST['user_name'], $_POST['password'], $_POST['user_type']);
- $data = mysql_query("SELECT *
- FROM users
- WHERE user_name == ($_POST['user_name'])
- AND ($_POST['password'])
- AND ($_POST['user_type'])") or die(mysql_error());
- $info = mysql_fetch_array($data);
- $count = mysql_numrows($data);
- if ($count == 1) {
- echo("Success!!");
- } else {
- echo("BIG FRIGGIN FAILURE!!");
- }
- mysql_close($con);
- $data = mysql_query("SELECT * from users where user_name == ($_POST['user_name']) and ($_POST['password']) and ($_POST['user_type'])"
- $user_name = mysql_real_escape_string($_POST['user_name']);
- $password = mysql_real_escape_string($_POST['password']);
- $user_type = mysql_real_escape_string($_POST['user_type']);
- $data = mysql_query("SELECT * FROM users WHERE user_name == '$user_name' AND password == '$password' AND user_type == '$user_type'");
- if(isset($_POST['user_name'], $_POST['password'], $_POST['user_type'])){
- $data = mysql_query("SELECT * from users
- where user_name = '".mysql_real_escape_string($_POST['user_name'])."' and
- password = '".mysql_real_escape_string($_POST['password'])."' and
- user_type = '".mysql_real_escape_string($_POST['user_type'])."' ");
- if(mysql_numrows($data) == 1) {
- $info = mysql_fetch_array($data);
- echo("Success!!");
- } else {
- echo("BIG FRIGGIN FAILURE!!");
- }
- }
- else{
- echo "Required Data Missing";
- }
- mysql_close($con);
- mysql_query("SELECT * from users where user_name == ($_POST['user_name']) and ($_POST['password']) and ($_POST['user_type'])")
- //do escaping here. See note below.
- $username = isset($_POST['user_name']) ? mysql_real_escape($_POST['user_name']) : '';
- $pass = isset($_POST['password']) ? mysql_real_escape($_POST['password']) : '';
- $type = isset($_POST['user_type']) ? mysql_real_escape($_POST['user_type']) : '';
- mysql_query("SELECT * from users where user_name = '{$username}' AND password = '{$pass}' AND user_type = '{$type}'")
Add Comment
Please, Sign In to add comment