Guest User

Untitled

a guest
Sep 3rd, 2018
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. <?php
  2.  
  3. $host=""; // Host name mysql1.000webhost.com
  4. $username=""; // Mysql username
  5. $password=""; // Mysql password
  6. $db_name=""; // Database name
  7. $tbl_name=""; // Table name
  8.  
  9. mysql_connect($host, $username, $password)or die("cannot connect");
  10. mysql_select_db($db_name)or die("cannot select DB");
  11.  
  12. //===============End Server Configuration============
  13.  
  14. //=============Starting Registration Script==========
  15.  
  16. $myusername=$_POST['myusername'];
  17. $mypassword=$_POST['mypassword'];
  18.  
  19. //============New Variable of Password is Now with an Encrypted Value========
  20.  
  21. if(isset($_POST['btnRegister'])) //===When I will Set the Button to 1 or Press Button to register
  22. {
  23. $query = "insert into members(username,password)values('$myusername','$mypassword')";
  24. $res = mysql_query($query);
  25. header('location:index.php');
  26. }
  27.  
  28. ?>
Add Comment
Please, Sign In to add comment