Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $pdo = new PDO("mysql:host=localhost;dbname=fantapc", 'root', '');
- if(isset($_POST['addcard'])) {
- $cardname = $_POST['card_input'];
- $rarity = $_POST['rarity_input'];
- $image = $_POST['img_input']
- $query = $pdo->prepare("INSERT INTO cards (name,rarity,img) VALUES (:name,:rarity,:img)");
- $query->bindValue(":name", $cardname, PDO::PARAM_STR);
- $query->bindValue(":rarity", $rarity, PDO::PARAM_STR);
- $query->bindValue(":img", $image, PDO::PARAM_STR);
- $query->execute();
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement