title: How to display selected value Form drop down list?
body: <p>I have a list proxy.Once I select and save it I want to display the selected data. How can I do this?.I want to display it in selected list and once I reload or get back to that page `</p>
  
  <pre><code>&lt;?php
  include_once("../noaccess.php"); 
  include_once(CLASS_PATH."fetch_service.php"); 
  $objfetch = new fetchService();
  include_once(CLASS_PATH."proxy.php");
  $objproxy = new Proxy();
  include_once(CLASS_PATH."log.php"); 
  $objlog= new changelog();
  $account_id=$_SESSION['account_id'];
  global $mysqli;
  if($_POST['submit']=="Save")
  {
      $pname=$_POST['proxy'];
      $query="UPDATE `proxy` SET `proxy_default`='1' where `proxyname`='$pname'";
      $mysqli-&gt;query($query) or die($mysqli-&gt;error);
      $_SESSION['check_update'] = "1";
      setcookie("msg","Proxy Seleted",time()+5,"/");
      header("location:".SITE_URL."index.php?view=default_proxy");
  }
  ?&gt;
  
  &lt;form name="frmcr" id="frmcr" action="" method="post" enctype="multipart/form-data"&gt;
  &lt;input type="hidden" name="mode" id="mode" value="insert" /&gt;
  &lt;table align="left" id="tblworking_hours" class="tbl_altcolor shadow" style="width:25%;margin-left:30px"&gt;
     &lt;thead&gt;
        &lt;tr&gt;
           &lt;th align="center"&gt;&lt;b&gt;Proxy&lt;/b&gt;&lt;/th&gt;
           &lt;td&gt;&lt;select name="proxy" id="proxy" class="required input"&gt;
                 &lt;option value=""&gt;Select&lt;/option&gt;
                 &lt;!--              &lt;option value="&lt;?php echo $i ;?&gt;"&lt;?php echo $i==$ring21 ? "selected":"";?&gt; &gt;&lt;?php echo $i;?&gt;&lt;/option&gt; --&gt;
  
                 &lt;?php
                      $result = $objfetch-&gt;fetch_proxy("*","where account_id='".$_SESSION['account_id']."' ");
                            foreach($result as $key=&gt;$resrproxy)
                            {
                            ?&gt;
                 &lt;option value="&lt;?php echo $resrproxy['proxyname'];?&gt;"&lt;?php echo $resrproxy['proxyname']== $resrproxy['proxyname'] ? "selected":"";?&gt;&gt;&lt;?php echo $resrproxy['proxyname'];?&gt;&lt;/option&gt;
                 &lt;?php } ?&gt;
              &lt;/select&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
           &lt;td colspan="2" align="center"&gt;&lt;input type="submit" name="submit" id="submit" value="Save" class="btn" style="margin-left:35px;"/&gt;&lt;/td&gt;
        &lt;/tr&gt;
     &lt;/thead&gt;
  &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>