SHARE
TWEET

Untitled

a guest Jul 17th, 2017 44 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, detailed_question FROM faq_questions");
  17.  
  18. while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
  19.     printf("Question: %s Answer: %s<br></table>", $row["question"], $row["detailed_question"]);
  20. }
  21.  
  22. mysql_free_result($result);
  23. ?>
RAW Paste Data
Top