Hi guys,
I got a website hosted (.php) on godaddy with a domain name
+ I got a conquer private server hosted on a vps (NFO)
I wanna know how to make the connection from web site to database vps ?
so people will be able to register from website to database
How do I set up my Config.php ?
For this exemple: web host ip: AAAAAA , vps ip: BBBBBB
Mysql user:CCCC pass: DDDD database name:EEEEE
<?php
$serveraddress='';
$serverport='';
$dbhost=''; //Hostname
$dbuser='; //MySql User
$dbpasswd=''; //MySql Password
$dbname=''; //DB For accounts
$description=''; // server description
$servername=''; // Server name appear on pages titles
$serverdesc='';
//////////////////////////////////////////////////////////
$rs = mysql_connect('127.0.0.1', $dbuser, $dbpasswd) or die(mysql_error());
mysql_select_db($dbname,$rs) or die(mysql_error());
if ($_GET['act']=='logout'){
session_destroy();
?>
<META HTTP-EQUIV="REFRESH" CONTENT="1;URL=index.php">
<?php
}
$acc=$_SESSION['acc'];
$uid=$_SESSION['uid'];
?>
Thanks for help !
I got a website hosted (.php) on godaddy with a domain name
+ I got a conquer private server hosted on a vps (NFO)
I wanna know how to make the connection from web site to database vps ?
so people will be able to register from website to database
How do I set up my Config.php ?
For this exemple: web host ip: AAAAAA , vps ip: BBBBBB
Mysql user:CCCC pass: DDDD database name:EEEEE
<?php
$serveraddress='';
$serverport='';
$dbhost=''; //Hostname
$dbuser='; //MySql User
$dbpasswd=''; //MySql Password
$dbname=''; //DB For accounts
$description=''; // server description
$servername=''; // Server name appear on pages titles
$serverdesc='';
//////////////////////////////////////////////////////////
$rs = mysql_connect('127.0.0.1', $dbuser, $dbpasswd) or die(mysql_error());
mysql_select_db($dbname,$rs) or die(mysql_error());
if ($_GET['act']=='logout'){
session_destroy();
?>
<META HTTP-EQUIV="REFRESH" CONTENT="1;URL=index.php">
<?php
}
$acc=$_SESSION['acc'];
$uid=$_SESSION['uid'];
?>
Thanks for help !