Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require 'connection.php';
- if (isset($_POST['submit'])) {
- $res= $conn->prepare("Insert into user (Name,Email,user_name,password)Values (:name,:email,:user,md5(:pass))");
- $res->bindParam(':name', $name);
- $res->bindParam(':email', $email);
- $res->bindParam(':user', $user);
- $res->bindParam(':pass', $pass);
- $name = $_POST['name'];
- $email = $_POST['email'];
- $username =$_POST['user'];
- $password = $_POST['pass'];
- $res->execute();
- if ($res==TRUE) {
- echo 'Registered successfully';
- } else {
- echo 'There was some error.';
- }
- }
- ?>
- <body>
- <form action="Registration.php" method="post" >
- Name:<br>
- <input type="text" name="name"/><br>
- Email:<br>
- <input type="text" name="email" /><br>
- Username:<br>
- <input type="text" name="user" /><br>
- Password:<br>
- <input type="password" name="pass" /><br>
- <input type="submit" name="submit" value="SignUp!"/>
- </form>
- </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement