SHARE
TWEET

Untitled

a guest Jul 17th, 2017 38 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $db_host = '67.23.2.219';
  3. $db_user = 'user1';
  4. $db_pwd = '';
  5.  
  6. $database = 'test';
  7. $table = 'faq_questions';
  8.  
  9. if (!mysql_connect($db_host, $db_user, $db_pwd))
  10.     die("Can't connect to database");
  11.  
  12. if (!mysql_select_db($database))
  13.     die("Can't select database");
  14.  
  15. // sending query
  16. $result = mysql_query("SELECT question AND detailed_question FROM {$table}");
  17. if (!$result) {
  18.     die("Query to show fields from table failed");
  19. }
  20.  
  21. $product_name = "<td>$row['question']</td>";
  22. $release_date = "<td>$row['detailed_question']</td>";
  23. ?>
  24. <table>
  25. <tr><td>Question</td><?=$product_name?></tr>
  26. <tr><td>Detailed question</td><?=$release_date?></tr>
  27.  
  28. </table>
RAW Paste Data
Top