I am trying to make an installation file, so that when a user uses my script, they can enter their credentials into a number of forms and it goes and posts that information in the database file etc.
Heres my code for the installation file:
<html>
<head>
    <title>Installation</title>
        <link href="/css/bootstrap.min.css" rel="stylesheet" media="screen">
</head>
    <div class="container">
        <h2>Welcome to McApplicator!</h2>
            <p>Installation is simple. Please follow the instructions below.</p>
            <?php
                        $dbhost = $_POST['database_server'];
                        $dbusername= $_POST['database_user'];
                        $dbpasswd= $_POST['database_password'];
                        $database_name= $_POST['database_name'];  
                        $owner_email = $_POST['owner_email'];
            ?>
    <form action="register.php" method="post" name="" id="">
        <div class="form-group">
                            <label>Database Server</label>
                            <input type="text" class="form-control" name="database_server" value="localhost" />
                        </div>
                        <div class="form-group">
                            <label>Database User</label>
                            <input type="text" class="form-control" name="database_user" />
                        </div>
                        <div class="form-group">
                            <label>Database Password</label>
                            <input type="text" class="form-control" name="database_password" />
                        </div>
                        <div class="form-group">
                            <label>Database Name</label>
                            <input type="text" class="form-control" name="database_name" />
                        </div>
                    <div class="form-group">
                            <label>Owners Email</label>
                            <p class="help-block">e.g: admin@gmail.com</p>
                            <input type="text" class="form-control" name="owner_email" />
                        </div>
                        <div class="form-group">
                            <button type="submit" name="submit" class="btn btn-primary col-lg-4">Install</button>
                        </div>
                    </form>
</html>
and then the db.php file
<? 
/*  Database Information - Required!!  */
/* -- Configure the Variables Below --*/
  $dbhost = $_POST['database_server'];
$dbusername= $_POST['database_user'];
$dbpasswd= $_POST['database_password'];
$database_name= $_POST['database_name'];  
/* Database Stuff, do not modify below this line */
$connection = mysql_pconnect("$dbhost","$dbusername","$dbpasswd") 
    or die ("Couldn't connect to server.");
$db = mysql_select_db("$database_name", $connection)
    or die("Couldn't select database.");
?>
However it says it cannot connect to the database.
Thanks, Mark
 
    