[eluser]Rick Jolly[/eluser]
[quote author="imamiscool" date="1183961112"]
Did you mean:
$query = $this->db->query("SELECT * FROM `utilizador` WHERE `user`= '".$_POST['user']."' and pass = '".SHA1($_POST['pass'])."' WHERE admin=1");
?
USE: 'WHERE admin=1'
NOT: 'AND admin=1'[/quote]
Nope, one "WHERE" is definitely enough imamiscool. However, Ribeiro should sql escape the posted data.
Ribeiro, I'm having trouble understanding your question. What does this mean:
Quote:if i click in the button return i go back to mi page
Do you mean the back button? Also, I don't see any code that inserts into your database:
Quote:if i try to insert something int the database it will insert first and then goes back for the login page.