title: Can I Set The Value Of A Text Input Field Using A Variable?
body: <p>I am having one form. I am submitting the values to database of table test fields something .I want to fetch those existing values to text field so that I can edit and update again.</p>
  
  <p>I am using below code but I am not getting valid output.</p>
  
  <p>Can anyone help thanks in advance.</p>
  
  <pre><code>//these values iam passing from one form
  $bre=$_POST['bf'];
  $bres=$_POST['bs'];
  $bree=$_POST['be'];
  $lun=$_POST['lu'];
  $luns=$_POST['ls'];
  $lune=$_POST['le'];
  $dinn=$_POST['din'];
  $dins=$_POST['sd'];
  $dine=$_POST['se'];
  
  echo $bre;
  echo $bres;
  echo $bree;
  echo $lun;
  echo $luns;
  echo $lune;
  echo $dinn;
  echo $dins;
  echo $dine;
  
  
  echo "&lt;table width=791 border=1&gt;&lt;tr&gt;&lt;td width=243&gt;Breakfast&lt;input type=text name=bfh value= $bre&gt;&lt;/td&gt;
  &lt;td width=239&gt;Stat Time&lt;input type=hidden name=bsh value=$bres/&gt;
          &lt;/td&gt;
      &lt;td width=244&gt;
        End Time
          &lt;input type=text name=beh value=$bree /&gt;
            &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        Lunch
          &lt;input type=hidden name=luh value=$lun /&gt;
            &lt;/td&gt;
      &lt;td&gt;Stat Time
  
        &lt;input type=hidden name=lsh value=$luns/&gt;
        &lt;/td&gt;
      &lt;td&gt;End Time
  
        &lt;input type=hidden name=leh value=$lune/&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Dinner
        &lt;input type=hidden name=dinh value=$dinn/&gt;&lt;/td&gt;
      &lt;td&gt;Stat Time
        &lt;input type=hidden name=sdh value=$dins/&gt;&lt;/td&gt;
      &lt;td&gt;End Time
        &lt;input type=hidden name=seh value=$dine/&gt;&lt;/td&gt;
    &lt;/tr&gt;
  
  &lt;/table&gt;";
  </code></pre>