Guest User

Untitled

a guest
Feb 23rd, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. <div class="container">
  2. <div class="row">
  3.  
  4. <div class="col-sm-3">
  5. <div class="questions">
  6. <?php
  7. $results = $wpdb->get_results( "SELECT * FROM $wp_dbquestions"); // Query to fetch data from database table and storing in $results
  8. if(!empty($results)) // Checking if $results have some values or not
  9. {
  10. echo"<p>$row->text</p>";
  11. }
  12. $results = $wpdb->get_results( "SELECT * FROM $wp_questoptions WHERE question_id=1"); // Query to fetch data from database table and storing in $results
  13. if(!empty($results)) {
  14. foreach($results as $row){
  15. echo"<form class="options">";
  16. echo"<input class="option" type="radio">$row->text <br>";
  17. echo"<input class="option" type="hidden">$row->score <br>";
  18. echo"</form>";
  19. }
  20. ?>
  21. </div>
  22.  
  23. </div>
  24. </div>
  25. </div>
Add Comment
Please, Sign In to add comment