title: Retrieve data from database with id value
body: <p>This is a link from another php file which directs to update.php file. I got the id of the link from this link. Now i want to use that id to retrieve data from database how can i do that?</p>
  
  <pre><code>echo '&lt;a href="update.php?id= "'.$row['id'].'"&gt;Modify&lt;/a&gt;';
  </code></pre>
  
  <p>Now This is my update.php file</p>
  
  <pre><code>echo "&lt;form method=\"POST\" action=\"\"&gt;\n"; 
  include_once 'dbconnect.php';
  $id= $_GET['id'];
  $query  = "SELECT * FROM promoter where id=$id ";// this code is not retrieving value from database
  $result = mysql_query($query);
  while($row = mysql_fetch_array($result, MYSQL_ASSOC))
  {   $user_id=$row['user_id'];
  $full_name=$row['full_name'];
  $qualification=$row['qualification'];
  $locality=$row['locality'];
  $description=$row['description'];
  }
  
  echo "&lt;td&gt;User Id&lt;/td&gt;&lt;td&gt; &lt;input type=\"text\" name=\"user_id\" value=\"$user_id\"&gt;&lt;/td&gt;\n"; 
  echo "&lt;/tr&gt;\n"; 
  echo "&lt;tr&gt;\n"; 
  echo "&lt;td&gt;Full Name&lt;/td&gt;&lt;td&gt; &lt;input type=\"text\" name=\"full_name\" value=\"    $full_name\"&gt;&lt;/td&gt;\n"; 
  echo "&lt;/tr&gt;\n"; 
  echo "&lt;tr&gt;\n"; 
  echo "&lt;td&gt;Qualification&lt;/td&gt;&lt;td&gt; &lt;input type=\"text\" name=\"qualification\" value=\" $qualification\"&gt;&lt;/td&gt;\n"; 
  echo "&lt;/tr&gt;\n"; 
  echo "&lt;tr&gt;\n"; 
  echo "&lt;td&gt;Locality&lt;/td&gt;&lt;td&gt; &lt;input type=\"text\" name=\"locality\" value=\" $locality\"&gt;&lt;/td&gt;\n"; 
  echo "&lt;/tr&gt;\n"; 
  echo "&lt;tr&gt;\n"; 
  echo "&lt;td&gt;Description&lt;/td&gt;&lt;td&gt; &lt;input type=\"text\" name=\"description\"     value=\" $description\"&gt;&lt;/td&gt;\n"; 
  echo "&lt;/tr&gt;\n";
  
  echo "&lt;/form&gt;\n"; 
  </code></pre>
  
  <p>Now I want to retrieve the data from data base having id= the id value that i have got from the link so that i can display the value according to id</p>