daily pastebin goal
40%
SHARE
TWEET

Untitled

a guest Jun 8th, 2017 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $host = $_POST["host"];
  3. $username = $_POST["uname"];
  4. $password = $_POST["pw"];
  5. $password2 = $_POST["pw2"];
  6. $db= = $_POST["db"];
  7.  
  8.  
  9. if($password != $password2)
  10.     {
  11.         echo "Passwords do no match. Please go back and try again";
  12.     }
  13.    
  14. $con = mysql_connect($host, $username, $password);
  15. if (!$con)
  16.   {
  17.   die('Could not connect: ' . mysql_error());
  18.   }
  19.  
  20. mysql_query(create database $db);
  21.  
  22. mysql_select_db($db, $con);
  23.  
  24. $sql = "CREATE table forum
  25.     {
  26.     forumid bgint(20) NOT NULL AUTO_INCREMENT,
  27.     PRIMARY KEY(forumid),
  28.     subject varchar(100) NOT NULL,
  29.     name varchar(25) NOT NULL,
  30.     message text NOT NULL,
  31.     sorter int(20) NOT NULL,
  32.     submitdate varchar(20) NOT NULL,
  33.     belongstoid bgint(20) NOT NULL,
  34.     replys int(11) NOT NULL,
  35.     host varchar(100) NOT NULL,
  36.     time varchar(15),
  37.     lastreply varchar(35) NOT NULL,
  38.     lastposter varchar(20) NOT NULL
  39.     }";
  40.  
  41. mysql_query($sql,$con);
  42.  
  43. $sql2 = "CREATE table users
  44.     {
  45.     id int(11) NOT NULL.
  46.     PRIMARY KEY(id),
  47.     fname varchar(20),
  48.     lname varchar(20),
  49.     age varchar(8),
  50.     sex varchar(6),
  51.     location varchar(40) NULL,
  52.     email varchar(50),
  53.     username varchar(20),
  54.     password varchar(100) NULL,
  55.     updateu varchar(20),
  56.     joindate varchar(15),
  57.     posts int(6),
  58.     imagename varchar(255) NOT NULL
  59.     }";
  60.    
  61. mysql_query($sql2,$con);
  62.  
  63. mysql_close($con);
  64.  
  65. echo "Done!";
  66.  
  67. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top