Jump to content

mysterio

Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mysterio's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. The query is $sql = "SELECT * FROM users WHERE email = '$email' and password = '$pwd_hash' LIMIT 1"; The query does return a value because mysql_num_rows($sql) != 0 when I execute the query.
  2. The following php code is failing when a valid connection to a mysql database exists. I know $row is not empty because I have verified that. $result = mysql_query($sql); $row = mysql_fetch_row($result); $status = $row['status']; $logincount = $row['logincount']; $status and $logincount have no value, i.e. = '', done this way. However, the calls $status = $row[3]; $logincount = $row[4]; work and assign the correct value to $status and $logincount. Any idea why? It's so much easier to read if you can access the values by strings and not numbers, especially if you reorder your database.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.