Another questions about my installer, I just can't get this bit working.
I have an input section so user's can add there MySQL details and it creates a config.php file for connecting ect, but when I use variables for the database name and database username it throws out a connection error, but when I don't it connects fine
here's the code im using when it connects
$host = $_POST['host'];
$user = $_POST['user'];
$name = $_POST['name'];
$password = $_POST['password'];
//Host | Database User | Database Password
mysql_connect($host, "game", $password) or die(mysql_error());
//Database Name
mysql_select_db("game") or die(mysql_error());
and when it doesnt
$host = $_POST['host']; $user = $_POST['user']; $name = $_POST['name']; $password = $_POST['password']; //Host | Database User | Database Password mysql_connect($host, $user, $password) or die(mysql_error()); //Database Name mysql_select_db($name) or die(mysql_error());


Sign In
Create Account


Back to top









