Which Better, Login via mysql_connect or database ??
I 'm confused to make Login System (Authentication).. :confused: :confused:
Which one is better :
1. Login via mysql_connect :
- like :
$user=$_POST["TxtUser"];
$pass=$_POST["TxtPass"];
mysql_connect("localhost",$user,$pass);
2. or via database / table :
- like :
mysql_connect("localhost","root","123");
mysql_select_db("Login");
$result=mysql_query("Select * from MsLogin where Username='".$user."' and Password='".$pass."'");
Total User : more than 1400.., and every user have specific limitation on database and table..
Thank you... :bigyello: :bigyello:
Re: Which Better, Login via mysql_connect or database ??
You should only need at most one MySQL user per application. So, always the second option ;)
Not to mention the first option is wrought with hosting permissions issues with adding the users and granting permissions, etc. And you don't want to give full MySQL access to every user, far from it.