Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <title>admin portal</title>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <link rel="stylesheet" type="text/css" href="css/style.css" media="screen">
- </head>
- <body>
- <div align="center">
- <div class="form-area">
- <form action="" method="post" enctype="multipart/form-data">
- <input type="text" name="fname" value="" placeholder="First Name">
- <input type="text" name="lname" value="" placeholder="Last Name">
- <input type="text" name="username" value="" placeholder="Username">
- <input type="email" name="email" value="" placeholder="Email">
- <input type="password" name="password" value="" placeholder="Password">
- <input type="password" name="cfpassword" value="" placeholder="Confirm Password">
- <input type="submit" name="register" value="Register"><br>
- </form>
- </div>
- </div>
- </body>
- </html>
- <?php
- if (isset($_POST["submit"])) {
- $fname = $_POST['fname'];
- $lname = $_POST['lname'];
- $username = $_POST['username'];
- $email = $_POST['email'];
- $password = $_POST['password'];
- $cfpassword = $_POST['cfpassword'];
- $sql = <<<EOF
- INSERT INTO USERS (ID, FNAME, LNAME, USERNAME, EMAIL, PASSWORD, PASSCONFIRM)
- VALUES (1, '$fname', '$lname', '$username', '$email', '$password',
- $cfpassword );
- EOF;
- $ret = $db->exec($sql);
- if(!$ret){
- echo $db->lastErrorMsg();
- } else {
- echo "Registered Successfullyn";
- }
- $db->close();
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement