Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(isset($_POST['username']) && isset($_POST['password']))
- {
- $username = $_POST['username'];
- $password = $_POST['password'];
- $dbhost = 'localhost';
- $dbname = 'storify';
- $dbuser = 'root';
- $dbpass = '';
- $pdo_info = "mysql:host=$dbhost;dbname=$dbname";
- $conn = new PDO($pdo_info, $dbuser, $dbpass);
- $check = $conn->prepare("INSERT INTO users (Username, Password) VALUES (?,?)");
- $check->bindParam(1, $username);
- $check->bindParam(2, $password);
- $check->execute();
- echo " paswword: " + $password;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement