| | |
Log In Script Problem
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
0
#11 Nov 1st, 2009
Rather than:
Try this:
It should throw an error in the SQL statement.
PHP Syntax (Toggle Plain Text)
$data = mysqli_query($dbc, $query);
PHP Syntax (Toggle Plain Text)
if (!$data = mysqli_query($dbc, $query)) { printf("Error message: %s\n", mysqli_error($dbc)); }
It should throw an error in the SQL statement.
AJAX is not a programming language, scripting language or any other sort of language.
It is acheived by using JavaScript http functions.
So, AJAX = JavaScript.
It is acheived by using JavaScript http functions.
So, AJAX = JavaScript.
0
#13 Nov 1st, 2009
Do you have phpMyAdmin?
If you do, copy the query from your script and run it directly in there.
You say 'It still didn't work', do you mean it does exactly the same, or are you getting additional/different errors after changing the code?
If you do, copy the query from your script and run it directly in there.
You say 'It still didn't work', do you mean it does exactly the same, or are you getting additional/different errors after changing the code?
AJAX is not a programming language, scripting language or any other sort of language.
It is acheived by using JavaScript http functions.
So, AJAX = JavaScript.
It is acheived by using JavaScript http functions.
So, AJAX = JavaScript.
•
•
Join Date: Jul 2008
Posts: 44
Reputation:
Solved Threads: 1
0
#14 Nov 2nd, 2009
Sorry, I was in a hurry
But I added the ifthen statement that you had, but I'm still getting the 'enter a valid password and username' error. I do have phpMyAdmin, so do you mean to do something like this:
EDIT: I see where I messed up, in the example there is the SHA encryption, but its not encrypted in the database. So I fixed it now
But I added the ifthen statement that you had, but I'm still getting the 'enter a valid password and username' error. I do have phpMyAdmin, so do you mean to do something like this:
PHP Syntax (Toggle Plain Text)
SELECT user_id, username FROM login WHERE username = '$user_username' AND password = SHA('$user_password')
EDIT: I see where I messed up, in the example there is the SHA encryption, but its not encrypted in the database. So I fixed it now
Last edited by phouse512; Nov 2nd, 2009 at 5:25 pm.
![]() |
Similar Threads
- Convert shell script for looping (Shell Scripting)
- simple ajax script problem (JavaScript / DHTML / AJAX)
- hjt log and a related problem (Viruses, Spyware and other Nasties)
- My HJT log - desktop problem (Viruses, Spyware and other Nasties)
- IE opens by itself and other problems, hijack log included (Viruses, Spyware and other Nasties)
- Email piping to script problem (PHP)
- log in script saves cookie (JavaScript / DHTML / AJAX)
- Hacktool.Rootkit problem (Viruses, Spyware and other Nasties)
- hijack this log:Please help diagnose problem (Viruses, Spyware and other Nasties)
- Script problems with IE (Web Browsers)
Other Threads in the PHP Forum
- Previous Thread: Search string is too exact help
- Next Thread: Is the a correct url regex?
Views: 585 | Replies: 13
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class clean cms code countingeverycharactersfromastring cron curl database date directory display download dynamic echo email error file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla jquery limit link login loop mail match menu methods mlm mod_rewrite multiple mysql oop parse paypal pdf php problem query radio random recursion regex remote script search select server sessions simple sms soap source space spam speed sql structure syntax system table tutorial update updates upload url validation validator variable video web xml youtube





