<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Install test</title>
<?php
$dbs = "tocotex_staging";
$dbu = "tocotex_staging";
$dbp = "Tocotex7765";

$con = mysqli_connect("localhost",$dbu,$dbp);
if (!$con)
  {
  die('Could not connect to database: ' . mysqli_error());
  echo 'database not connected';
  }
else {
  echo 'database <b>'.$dbs.'</b> connected. User: <b>'.$dbu.'</b>.';
}
mysqli_select_db($con, $dbs);

$table_name = "users";
$user_query = "SELECT username, email FROM $table_name ";
$user_result = $con->query($user_query);
$user_num = mysqli_num_rows($user_result);


?>
</head>

<body>
<br />
<br />
Install test<br />


<?php
echo 'mySQL query: '.$user_query;
echo '<br>--------------------------------------------------------------------<br><br>';

echo 'USER LIST: <br />';
echo 'number of users: '.$user_num.'<br><br>';

while($row = $user_result->fetch_assoc()) {
$username = $row["username"];
$email = $row["email"];

echo $username.'   -    '. $email.'<br>';

}
?>
<br />
End of list

</body>
</html>