Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(0);
- if(isset($_POST['submit']))
- {
- $name=$_POST['name'];
- $record = 'users/'.$name.'_data.php';
- $fh = fopen($record, 'w') or die("J'peux pas ouvrir le fichier sorry.");
- $tag='<?php ';
- fwrite($fh, $tag);
- $reguser = '$Username = "' .$_POST['name']. "\";\n";
- fwrite($fh, $reguser);
- $reguser2 = '$Password = "' .$_POST['password']. '";';
- fwrite($fh, $reguser2);
- $tag2=' ?>';
- fwrite($fh, $tag2);
- fclose($fh);
- echo 'Registered';
- }
- else
- {
- echo '<html>'.
- '<form method="POST" action=""> '.
- '<input type="text" name="name">'.
- '<input type="password" name="password">'.
- '<input type="submit" name="submit" value="submit">'.
- '</form>'.
- '</html>';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement