|
[SOLVED] Using the login Details via App
|
|
01-24-2012, 11:45 PM
Post: #31
|
|||
|
|||
|
RE: Using the login Details via App
Invalid login my code looks like this now:
// Check membername and HWID $query = "SELECT member, hwid FROM loginlist WHERE member = '$username'"; $result = mysql_query($query); if ($result && mysql_num_rows($result)) { $row = mysql_fetch_array($result); if ($row['hwid']!=$hwid) { print_r($row); die(); echo "INVALID LOGIN"; exit; |
|||
|
01-24-2012, 11:47 PM
Post: #32
|
|||
|
|||
|
RE: Using the login Details via App
In that snippet there change:
PHP Code: $query = "SELECT member, hwid FROM loginlist WHERE member = '$username'"; PHP Code: $query = "SELECT member, hwid FROM loginlist WHERE member = '{$username}'";
Quote:Golf and alcohol don't mix, that's why I don't drink and drive!Video Tutorials: Installing MyBB | Upgrading MyBB |
|||
|
01-24-2012, 11:51 PM
Post: #33
|
|||
|
|||
|
RE: Using the login Details via App
Invalid login my code looks now like this :
// Check membername and HWID $query = "SELECT member, hwid FROM loginlist WHERE member = '{$username}'"; $result = mysql_query($query); if ($result && mysql_num_rows($result)) { $row = mysql_fetch_array($result); if ($row['hwid']!=$hwid) { print_r($row); die(); echo "INVALID LOGIN"; exit; I have changed the last echo "INVALID LOGIN"; to echo "INVALID LOGIN2"; now it says INVALID LOGIN2 |
|||
|
01-24-2012, 11:54 PM
Post: #34
|
|||
|
|||
|
RE: Using the login Details via App
Try changing mysql_fetch_array to mysql_fetch_assoc()
Quote:Golf and alcohol don't mix, that's why I don't drink and drive!Video Tutorials: Installing MyBB | Upgrading MyBB |
|||
|
01-24-2012, 11:56 PM
Post: #35
|
|||
|
|||
|
RE: Using the login Details via App
Invalid Login2
code looks like this now : // Check membername and HWID $query = "SELECT member, hwid FROM loginlist WHERE member = '{$username}'"; $result = mysql_query($query); if ($result && mysql_num_rows($result)) { $row = mysql_fetch_assoc(); if ($row['hwid']!=$hwid) { echo "INVALID LOGIN1"; exit; |
|||
|
01-24-2012, 11:57 PM
Post: #36
|
|||
|
|||
|
RE: Using the login Details via App
It needs to be mysql_fetch_assoc($result)
Quote:Golf and alcohol don't mix, that's why I don't drink and drive!Video Tutorials: Installing MyBB | Upgrading MyBB |
|||
|
01-24-2012, 11:59 PM
Post: #37
|
|||
|
|||
|
RE: Using the login Details via App
Invalid Login2
code looks like this : // Check membername and HWID $query = "SELECT member, hwid FROM loginlist WHERE member = '{$username}'"; $result = mysql_query($query); if ($result && mysql_num_rows($result)) { $row = mysql_fetch_assoc($result); if ($row['hwid']!=$hwid) { echo "INVALID LOGIN1"; exit; |
|||
|
01-25-2012, 12:00 AM
Post: #38
|
|||
|
|||
|
RE: Using the login Details via App
Ok, post your full code in php tags again
Quote:Golf and alcohol don't mix, that's why I don't drink and drive!Video Tutorials: Installing MyBB | Upgrading MyBB |
|||
|
01-25-2012, 12:01 AM
Post: #39
|
|||
|
|||
RE: Using the login Details via App
(01-25-2012 12:00 AM)Tom K. Wrote: Ok, post your full code in php tags again PHP Code: <?php |
|||
|
01-25-2012, 12:05 AM
(This post was last modified: 01-25-2012 12:05 AM by Tom K..)
Post: #40
|
|||
|
|||
|
RE: Using the login Details via App
Ok this bit:
PHP Code: // Check if IP address is blockedReplace with this: PHP Code: // Check if IP address is blockedQuote:Golf and alcohol don't mix, that's why I don't drink and drive!Video Tutorials: Installing MyBB | Upgrading MyBB |
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)
Search
Member List
Calendar
Help




