So, reading up on MySQLI (YES I FEEL LIKE A BAWS!), and only just found out you can create a database/tables in php using MySQLI code...so here's my question
If my database is created have the page refresh than create the tables once the database is confirmed...
Here's my create_database.php
<?php
// connect to the MySQL server
$conn = new mysqli('localhost', 'root', '');
// check connection
if (mysqli_connect_errno()) {
exit('Connect failed: '. mysqli_connect_error());
}
// sql query with CREATE DATABASE
$sql = "CREATE DATABASE `Users` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci";
// Performs the $sql query on the server to create the database
if ($conn->query($sql) === TRUE) {
echo 'Database "tests" successfully created';
}
else {
echo 'Error: '. $conn->error;
}
$conn->close();
?>

New Topic/Question
Reply



MultiQuote



|