mypolls.php 310 B

123456789101112131415161718
  1. <?php
  2. require_once("./common.php");
  3. $id = $_SESSION['user']['id'];
  4. // get poll metadata
  5. $query = "SELECT * FROM polls WHERE owner_id = $id";
  6. $result = mysql_query($query);
  7. while ($row = mysql_fetch_assoc($result))
  8. $polls[] = $row;
  9. $smarty->assign("polls", $polls);
  10. $smarty->display("mypolls.html");
  11. ?>