title: Get data from MySQL database by specific id in url
body: <p>Im new to PHP MySQL. Im developing a songbook site.</p>
  
  <p>I'm trying to pull data in a database from the ID in the URL <code>site/publicsong.php?id=12</code>.</p>
  
  <pre><code>    &lt;?php
  
  
  // Create connection
  $conn = new mysqli($servername = "localhost";$username = "dansdlpe_dan";$password = "g+GbMr}DU4E@";$db_name = "dansdlpe_lyrics";);
  
  // Check connection
  $db_name = "dansdlpe_lyrics";
  mysqli_select_db($conn,$db_name);
  
  $id = $_GET['id'];
  $id = mysqli__real_escape_string($conn,$id);
  $query = "SELECT * FROM `lyrics_a` WHERE `id`='" . $id . "'";
  $result = mysqli__query($conn,$query);
  
  echo $row['id']; while($row = mysqli__fetch_array( $result )) {
  
  echo "&lt;br&gt;&lt;br&gt;";
  echo $row['eng_title'];
  echo $row['eng_lyrics'];
  echo $row['alphabet'];
  }
  ?&gt;
  </code></pre>
  
  <p>I changed mysql_ to mysqli_ and added $conn.</p>
  
  <p>And still i result is blank. Please help guys. Thanks in advance.</p>