MySQL Forums
Forum List  »  PHP

Lost in the SQL...
Posted by: John Olav O
Date: April 07, 2006 01:08AM

Hi, I am rather newbie and wonder if the following is possible with PHP and MySQL:

Let users log in by web form using their username and password, which both are in the database "database", and the table "customers". It's a lot of usernames and passwords, and all of them are associated with a third db-field, "customer relation", which have the value "10" or "20".

Problem:
When I am asking MySQL in the login-form the following should happen:
IF username==username AND password==password AND client relation=="10" OR client relation=="20", FORWARD USER (according to which relation, one of two urls) TO site location. Otherwise forward to error-page.

Anyone with any idea?

Options: ReplyQuote


Subject
Written By
Posted
Lost in the SQL...
April 07, 2006 01:08AM
April 07, 2006 02:59AM
April 07, 2006 08:59AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.