Advertisement
Guest User

Untitled

a guest
Aug 4th, 2015
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <?php
  3. $dbh = new PDO('mysql:dbname=reddit;host:localhost', 'root', '', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING));
  4. if(!empty($_GET['post'])) {
  5. $rows = $dbh->prepare('SELECT type, id FROM votes WHERE post = ?')
  6. $rows->execute($_GET['post']);
  7. $votetype = $rows->fetch();
  8. foreach ($votetypes as $votetype) {
  9. if($_GET['type'] = $votetype['type']) {
  10.  
  11. }
  12. }
  13. }
  14. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement