Advertisement
Guest User

Untitled

a guest
Jun 9th, 2017
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. $prefix = $_POST['prefix'];
  2. $sitetitle = $_POST['sitetitle'];
  3. $abusername = $_POST['abusername'];
  4. $abpassword = $_POST['abpassword'];
  5. $submit = $_POST['submit'];
  6. $su = $_POST['sqluser'];
  7. $sup = $_POST['sqlpassword'];
  8. if($submit)
  9. {
  10.  
  11. $prefix = $_POST['prefix'];
  12. $sitetitle = $_POST['sitetitle'];
  13. $abusername = $_POST['abusername'];
  14. $abpassword = $_POST['abpassword'];
  15. $submit = $_POST['submit'];
  16. $database = $_POST['database'];
  17. $abpassword = md5($abpassword);
  18.  
  19. $db = $prefix."_".$database;
  20. $pre = $prefix."_";
  21.  
  22. //Connect to SQL
  23. mysql_connect("localhost", "$su", "$sup")or die("cannot connect with the given SQL username/password");
  24. mysql_select_db("$db")or die("Error: Cannot select database<br/> mysql_error()");
  25. //End SQL Connect
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32. $someshit = "
  33. <?php
  34.  
  35. $var = "$db"; //My variable holding the database
  36.  
  37.  
  38. ?>
  39.  
  40. ";
  41.  
  42.  
  43. $open = fopen('global.php', 'w');
  44.  
  45.  
  46. =================Now here's the global file that the above creates!===========================
  47.  
  48. <?php
  49.  
  50. = 'cameron_groups'; //My variable holding the database
  51.  
  52.  
  53. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement