title: populate text box from MYSQL query
body: <p>I need to Query a database and then populate a textbox input with the result.</p>
  
  <p>I'm trying </p>
  
  <p>Date Called:</p>
  
  <pre><code>   &lt;td&gt;
        &lt;?php 
           $selectedSPK=$_POST['SPKSelect'];
          $assigned = $_POST['Sales_Exec'];
          $date = $_POST['DateSelect'];
  
  if ($selectedSPK)
  
  {
      $Call1query = "SELECT  Call1 FROM Data WHERE SPKCustNo  = '$selectedSPK' ";
  
  $Call1result = mysql_query($Call1query);
  
  
   while( $row = mysql_fetch_array($Call1result) ){
      $Call1 = $row["$Call1Result"];
  
      }
  
  }
  ?&gt;
      &lt;input type="text" name="Call1" id="Call1" value="&lt;?php echo( htmlspecialchars( $Call1) ); ?&gt;"/&gt;&lt;/td&gt;
  </code></pre>
  
  <p>But getting nothing out, where am I going wrong, Text inputs seem tricky to populate!</p>
  
  <p>Thankyou!</p>