title: Display book details from mysql-php
body: <p>I really need help.</p>
  
  <p>My problem now is i want to display the books details, which the data is from mysql.</p>
  
  <p>I tell step-by-step.</p>
  
  <ol>
  <li><p>i have table books in mysql</p></li>
  <li><p>from the table, i called the title and price using php, which display like this :</p></li>
  </ol>
  
  <p>Title : One
  Price : 20$</p>
  
  <hr>
  
  <p>Title : Two
  Price : 35$</p>
  
  <hr>
  
  <p>my php code is :</p>
  
  <pre><code>&lt;?php
  
  $db_host="localhost";
  $db_username="root";
  $db_pass="";
  $db_name="";
  
  @mysql_connect("$db_host","$db_username","$db_pass") or die("Could not connect to database.");
  
  @mysql_select_db("$db_name") or die("No database");
  
  
  $q=mysql_query("SELECT * FROM books ");
  
  while($result = mysql_fetch_array( $q )) 
   {
  
   echo "&lt;b&gt;Title:&lt;/b&gt; ".$result['title'] . " &lt;br&gt; ";
   echo "&lt;b&gt;Price:&lt;/b&gt; RM".$result['price_myr'] ."&lt;br&gt;"; 
   echo "&lt;br&gt;";
  
   }
  
  ?&gt;
  </code></pre>
  
  <ol>
  <li>Here the problem start. I want to display the book details ( author, publisher, descrp, etc...) when user click on the list above ( step 2) . So can anyone give me the idea on how can i do that ?  How to make the book list available for click and then it display the details.</li>
  </ol>
  
  <p>example :</p>
  
  <p>User click on listview ; Title:One ,
  the details about the book popup or load.</p>
  
  <p>I guess i need to use Ajax, but i dont know how. </p>
  
  <p>Hope members here can help. Much thanks !</p>