Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (isset($_POST['username']) || isset($_POST['username'])) {
- $username = $_POST['username'];
- $password = $_POST['password'];
- if (!empty($username) && !empty($password)) {
- echo "You have been registered at \n".date("d-m-y").",Thank you";
- $file=fopen("registered.txt","r+") or exit("unable to open file!");
- chmod("registered.txt", 0755);
- '$username='.$username;
- '<BR>$password='.$password;
- fclose($file);
- }
- else
- {
- echo 'One of the fields is empty';
- }}
- ?>
- <html>
- <body>
- <FORM action="bla.php" method="POST">
- Name:<input type="text" name="username">
- <BR>Password:<input type="text" name="password">
- <BR><input type="submit" name="Submit">
- </FORM>
- </body>
- </html>
Add Comment
Please, Sign In to add comment