0

I have three sites and i want to use single username and password (login information) for all of these three sites. User will register on one site and that login information will use for other sites as well. How can i do that using php. Kindly help me ASAP.

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by hemgoyal_1990
0

you should do this by connecting the database from your main domain name that is stored your all login information. you may use the below code for connecting with database:

$host = "localhost"; //change your host here
$user = "test"; //change your username here
$pass = "password";  //change your password here
$db_name = "database"; //change your database name
 
$db = mysql_connect($host, $user, $pass); //connect to databse
mysql_select_db($db_name, $db); //select database

in $host value change here with your hosting ip address. and after that you may use the same database for every domain name.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.