0
Login form in php and mysql
I have a login form for client and freelancers. For the login checking both the tables of freelancer and login. Is there anyway, to seperate the fetch like for client it should with client table only and for freelancer it should check with freelancer table only. I can't make two login form. Thanks in advance.
11 Answers
+ 3
The simplest thing you can do is to make a selection, which will include the types of users. For example : employer and freelancer. Then you can use it to select a specific table.
+ 1
So employer and freelancer both are going to login through the same form. From email only how will I get to know whether it is of freelancer or employer that is why I am checking in both?
+ 1
Yeah but in login form we are having two fields email n password
+ 1
I guess I can use radio button to segregate freelancer n client that will be helpful right?
+ 1
That is exactly what I was saying ;)
+ 1
Ooh Thank you then :). May I discuss one more query regarding showing error in registration form by using php and mysql
0
How to select I did not understand.
0
Aren't you allowed to use more than two fields?
0
Sure thing ;> Write it down.
0
I got toggle for freelcr and clnt. On hovering they are displaying different forms. So when I am directing errors from backend using header func of php it is using address of the page in which both forms are present. For freelncr it is working properly but for client it is first displaying freelncr then when I am.hovering over client then only it is showing error. Only solution I have is to on hovering I should direct to another page do from.this way we can have different urls which I needed for displaying errors.
- 1
Ofcourse you can make so. You can make two separate tables. One for the 'freelancers' and another for the 'clients'. You can then write the sql like so:
$sql = "SELECT * FROM TABLE_NAME";
to select all the rows in the table. Furthermore, you can now make query for your login system using the specific table.