Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try {
- $connection = new PDO("mysql:host=localhost;dbname=zuperdb", "root", "kissa2");
- } catch(PDOException $exc){
- die($exc->getMessage());
- }
- $query = $connection->prepare("INSERT INTO blog (author, title, content, timestamp, keywords) VALUES (id, :author, :title, :content, NOW(), :keywords)");
- $query->bind_param(":author", $author, PDO::PARAM_STR, 30);
- $query->bind_param(":title", $title, PDO::PARAM_STR, 50);
- $query->bind_param(":content", $content, PDO::PARAM_STR, 9000);
- $query->bind_param(":keywords", $keywords, PDO::PARAM_STR, 200);
- $query->execute();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement