Advertisement
Guest User

Untitled

a guest
Jul 5th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. <?php
  2.  
  3. error_reporting(0);
  4.  
  5. if(isset($_POST['submit']))
  6.  
  7. {
  8.  
  9. $name=$_POST['name'];
  10. $record = 'users/'.$name.'_data.php';
  11. $fh = fopen($record, 'w') or die("J'peux pas ouvrir le fichier sorry.");
  12. $tag='<?php ';
  13. fwrite($fh, $tag);
  14. $reguser = '$Username = "' .$_POST['name']. "\";\n";
  15. fwrite($fh, $reguser);
  16. $reguser2 = '$Password = "' .$_POST['password']. '";';
  17. fwrite($fh, $reguser2);
  18. $tag2=' ?>';
  19. fwrite($fh, $tag2);
  20. fclose($fh);
  21. echo 'Registered';
  22.  
  23. }
  24.  
  25. else
  26.  
  27. {
  28.  
  29. echo '<html>'.
  30. '<form method="POST" action=""> '.
  31. '<input type="text" name="name">'.
  32. '<input type="password" name="password">'.
  33. '<input type="submit" name="submit" value="submit">'.
  34. '</form>'.
  35. '</html>';
  36.  
  37. }
  38.  
  39. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement