Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- </head>
- <body>
- <form method="POST" action="index.php">
- <input placeholder="Email" type="text" name="email">
- <input placeholder="Age" type="text" name="age">
- <input placeholder="Password" type="password" name="password">
- <input type="submit">
- </form>
- </body>
- </html>
- <?php
- $email = $_POST["email"];
- $age = $_POST["age"];
- $password = $_POST["password"];
- $condition = (isset($email) && $age >= 16 && $age < 100 && strlen($password) > 5 && strlen($password) < 25);
- if($condition) {
- $dbopen = fopen("db.txt", "a") or die("something wrong with file system...");
- fwrite($dbopen, $age . "\n");
- fwrite($dbopen, $email . "\n");
- fwrite($dbopen, $password . "\n");
- fclose($dbopen);
- echo "All right";
- } else {
- echo "WRYYYYY";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement