Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $servername = "localhost";
- $username = "root";
- $password = "admin";
- try {
- $conn = new PDO("mysql:host=$servername;dbname=main", $username, $password);
- $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
- echo "Connected successfully";
- }
- catch(PDOException $e){
- echo "Connection failed: " . $e->getMessage();
- }
- $stmt = $conn->prepare('INSERT INTO `main`.`accounts` (`createdate`, `recentdate`, `username`, `themeset`, `totaluses`, `isonline`, `horoscope`, `age`, `profilepic`) VALUES (CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, '$name', '0', '0', '1', '0', '18', '$id')');
- $stmt->execute();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement