<div class="sections">
  <div class="info">Specify your database settings here. Please note that the database for our software must be created prior to this step. If you have not created one yet, do so now.</div><br>
  <div class="info">In this PHP Setup Wizard demo you may use any random database values.</div><br>
<?php 
if($_POST){
	$connect = mysql_connect($_POST["db_hostname"] , $_POST["db_username"] , $_POST["db_password"] )  or die ("<p class='error'>Couldnt connect to database ".mysql_error()."</p>");
	mysql_select_db($_POST["db_name"]) or die("<p class='error'>Couldnt find  to db ".mysql_error()."</p>");
	redirect("install.php?step=6");
}
?>
  <div class="row">
    <label for="field_db_hostname"> Database hostname </label>
    <div class="field">
      <input type="text" id="field_db_hostname" name="db_hostname" value="<?php echo $database_host ?>" class="text">
    </div>
  </div>
  <div class="clear"></div>
  <div class="row">
    <label for="field_db_username"> Database username </label>
    <div class="field">
      <input type="text" id="field_db_username" name="db_username" value="<?php echo $mysql_user ?>" class="text">
    </div>
  </div>
  <div class="clear"></div>
  <div class="row">
    <label for="field_db_password"> Database password </label>
    <div class="field">
      <input type="text" id="field_db_password" name="db_password" value="<?php echo $password ?>" class="text">
    </div>
  </div>
  <div class="clear"></div>
  <div class="row">
    <label for="field_db_name"> Database name </label>
    <div class="field">
      <input type="text" id="field_db_name" name="db_name" value="<?php echo $database ?>" class="text">
    </div>
  </div>
  <div class="clear"></div>
</div>
