Validating Login / Changing User settings / Php Mysql

sargatanas

New Member
my questions are about login, and changing already saved data.Question 1Until now I've only saved input in the tables of the database (registration steps), now I need to check if the input (login steps), match what is in database. In fact I have 3 types of users, then I'll have to check 3 kind of tables. Then if the input data matches with one of those 3 tables I will redirect the user to their specific area.I'm thinking about saving the submitted data \[code\]$login=$_REQUEST['login'];\[/code\] and \[code\]$password=$_REQUEST['password'];\[/code\] and compare with the login column in the database. Then if the login matches, I'll compare the password submitted with the one in the row, not in the column. But I don't know how to do this search and comparison, neither what to use. Then if both matches I'll redirect the user. Else I'll send a login error message; I know how to do this already.Question 2What if I need to change an already saved user, for example if they change their email address? My changing user's data web page is exactly the same like the registration user web page. Can I load the already saved options and values of registration? Then the user will change whatever is necessary, and then when they submit the new information, they would not create a new row in my table, but just overwrite the old information? How can I do this?
 
Top