Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>Oppgave1</title>
- <link rel="stylesheet" type="text/css" href="oppgaver2.css">
- </head>
- <body>
- <?php
- include '../navbar.php';
- ?>
- <h1>Please Register a User</h1>
- <form method="post">
- Username:<br>
- <input type="text" name="usr"><br>
- Password:<br>
- <input type="password" name="pswd"><br>
- Confirm Password:<br>
- <input type="password" name="cpswd"><br><br>
- <input type="submit" name="submit" value="Submit">
- </form>
- <?php
- if ($_POST[pswd]===$_POST[cpswd]){
- $fh=fopen("/var/www/html/gitte/oppgaver2/dnpswd.xml", "a") or die("Unable to open file!");
- $content= $_POST['usr'] . "," . $_POST['pswd'] . "\n";
- fwrite($fh, $content);
- fclose($fh);
- } else {
- echo "passordene var ikke lik, prøv på nytt!";
- }
- ?>
- <?php
- include '../footer.php';
- ?>
- </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement