daily pastebin goal
53%
SHARE
TWEET

Untitled

a guest Jun 8th, 2017 54 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.     }";
  32.  
  33. mysql_query($sql,$con);
  34.  
  35.  
  36. ?>
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