Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- </head>
- <body>
- <form action = "insertform.php" method="post">
- Username: <input type="text" name="username"><br />
- Password: <input type="text" name="password"><br />
- <input type="submit" name="submit">
- </form>
- <?php
- if(isset($_POST['submit'])){
- $con = mysql_connect("localhost","Steven","password");
- if(!$con){
- die("Can not connect:" . mysql_error());
- }
- mysql_select_db("credentials",$con);
- $sql = "INSERT INTO employees (Username,Password) VALUES('$_POST[username]','$_POST[password]')";
- mysql_query($sql,$con);
- mysql_close($con);
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement