Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //Create tables here
- $table_prefix = $_POST['ep-tbprefix'];
- $dbHost = $_POST[''];
- $dbUsername = $_POST[''];
- $dbPassword = $_POST[''];
- $dbDatabase = $_POST[''];
- //Connect
- $connection=mysqli_connect('$dbHost', '$dbUsername', '$dbPassword', '$dbDatabase');
- if (mysqli_connect_errno()) {
- echo "Failed to connect to MySQL: " . mysqli_connect_error();
- }
- $sql = "CREATE TABLE ep_users(
- user_id INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(user_id),
- user_login_name VARCHAR(60),
- user_display_name VARCHAR(60),
- user_password VARCHAR(60),
- user_password_salt VARCHAR(60),
- user_email VARCHAR(100),
- user_registration_date datetime,
- user_role VARCHAR(10),
- ";
- $sql .= "CREATE TABLE ep_options(
- option_id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(option_id),
- option_name LONGTEXT,
- option_value LONGTEXT";
- //Now execute our query's
- if (mysqli_multi_query($connection, $sql)) {
- do {
- //Store first result set
- if ($result = mysqli_store_result($connection)) {
- while ($row = mysqli_fetch_row($result)) {
- printf("%s\n", $row[0]);
- }
- mysqli_free_result($result);
- }
- //Print divider
- if (mysqli_more_results($connection)) {
- printf("-----------------\n");
- }
- } while (mysqli_next_result($connection));
- }
- mysqli_close($connection);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement