Guest User

Untitled

a guest
Mar 15th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. <?php
  2. if (isset($_POST['username']) || isset($_POST['username'])) {
  3. $username = $_POST['username'];
  4. $password = $_POST['password'];
  5. if (!empty($username) && !empty($password)) {
  6. echo "You have been registered at \n".date("d-m-y").",Thank you";
  7. $file=fopen("registered.txt","r+") or exit("unable to open file!");
  8. chmod("registered.txt", 0755);
  9. '$username='.$username;
  10. '<BR>$password='.$password;
  11. fclose($file);
  12. }
  13. else
  14. {
  15. echo 'One of the fields is empty';
  16. }}
  17. ?>
  18.  
  19.  
  20.  
  21. <html>
  22. <body>
  23. <FORM action="bla.php" method="POST">
  24. Name:<input type="text" name="username">
  25. <BR>Password:<input type="text" name="password">
  26. <BR><input type="submit" name="Submit">
  27. </FORM>
  28. </body>
  29. </html>
Add Comment
Please, Sign In to add comment