Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.48 KB | None | 0 0
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html>
  3.     <head>
  4.         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5.         <title>Login page</title>
  6.     </head>
  7.     <body>
  8.         <center><h3>Enter your credentials</h3></center>
  9.  
  10.         <form name="Form1" method="post" action="dashboard.php">
  11.  
  12.         Username: <input type="text" name="username" />
  13.         Password: <input type="text" name="password" />
  14.         <br/>DB Name: <input type="text" name="dbname" />
  15.         <input type="submit" name="submit" />
  16.         </form>
  17.        
  18.         <?php
  19.             if (isset($_POST['username']) && isset($_POST['password']) && isset($_POST['dbname']))
  20.             {
  21.                 include_once ('dashboard.php');
  22.                 $DB_name = $_POST['dbname'];
  23.                 $DB_user = $_POST['username'];
  24.                 $DB_password = $_POST['password'];
  25.  
  26.                 /*mysql_connect("localhost", "root", "ONGOINGwarfare1+2+3+");
  27.                 mysql_query("CREATE DATABASE $DB_name");
  28.                 mysql_query("CREATE USER $DB_user IDENTIFIED by '$DB_password'");
  29.                 mysql_query("GRANT all privileges ON $DB_name.* to '$DB_user'@'localhost' IDENTIFIED by '$DB_password'");
  30.  
  31.                 print "$DB_name was successfully created, now you can log into your database on Hive696 using the following line: <br>
  32.                         \"mysql -u$DB_user -p$DB_password;\"";*/
  33.             }
  34.         ?>
  35.     </body>
  36. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement