Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>RegPage</title>
- </head>
- <body>
- <form action ="bb.php" method="post">
- name: <input type="text" name "username">
- <br/>
- email: <input type="text" name ="email">
- <br/>
- password: <input type="password" name="password">
- <input type = "submit" value = "insert">
- </form>
- </body>
- </html>
- <?php
- $con=mysqli_connect('localhost','root','');
- if(!con)
- {
- echo 'not connected to server';
- }
- if (!mysqli_select_db ($con,'pilot'))
- {
- echo 'database not selected';
- }
- $name=$_post['username'];
- $email=$_post['email'];
- $password=$_post['password'];
- $sql="insert into dbinvestor (email,password,name) values ('$email','$password', '$name')";
- if (!mysqli_query($con,$sql))
- {
- echo 'not inserted';
- }
- else
- {
- echo 'inserted succesfuly';
- }
- header ("refresh:2;url=aa.html");
- ?>
Add Comment
Please, Sign In to add comment