Poslao: 17 Apr 2007 03:18
|
offline
- Pridružio: 30 Sep 2006
- Poruke: 137
|
I will give you the book if you want to see. I need to check but i still think that this function exist.
|
|
|
Registruj se da bi učestvovao u diskusiji. Registrovanim korisnicima se NE prikazuju reklame unutar poruka.
|
|
|
Poslao: 07 Maj 2007 16:58
|
offline
- Pridružio: 30 Sep 2006
- Poruke: 137
|
here is the query and it's not working
$query="SELECT username,password FROM 'table' WHERE username='".$_POST['username']."' and password = md5('".$_POST['password']."') ";
why?
|
|
|
|
Poslao: 07 Maj 2007 18:35
|
offline
- Blood
- Ugledni građanin
- Pridružio: 26 Jul 2003
- Poruke: 384
- Gde živiš: Beograd
|
$query="SELECT `username`,`password` FROM `table` WHERE `username`='".$_POST['username']."' and `password` = '".md5($_POST['password'])."'";
What is the point of taking the username and password from the database when you already have them?
|
|
|
|
Poslao: 07 Maj 2007 19:49
|
offline
- Pridružio: 30 Sep 2006
- Poruke: 137
|
i forgot to mansion that this is for checking the password.
Dopuna: 07 Maj 2007 19:49
with this query it give me "Query was empty".
|
|
|
|
|
Poslao: 07 Maj 2007 21:39
|
offline
- Pridružio: 30 Sep 2006
- Poruke: 137
|
I read the hole page but when i type in mysql console this code
select * from 'table' where username = 'user' and password = md5('pass');
it gives me empty row
here is the insert query
insert into 'table' values (null, 'user' , md5('pass') );
and the password is stored in the table in encryption form.
|
|
|
|
|
Poslao: 08 Maj 2007 12:41
|
offline
- Pridružio: 30 Sep 2006
- Poruke: 137
|
man that it's not the problem.
if i want to write
insert into table values (null, 'user' , md5('pass') );
it will be ok with the query, but the problem is in the md5 function.
and for the gay who said that Password function doesnt exist, he should see the "PHP and MySQL 3dbuzz" video or this book "Wrox - Beginning PHP, Apache, MySQL Web Development - 2004 - (By Laxxuss).pdf" to see that there is a function password() and also md5 function.
btw can you give me and short example for login script (insert for inserting a user and select for checking the usernam password)
|
|
|
|
|