<?php 


$query="SELECT * FROM ".$prefix."employee WHERE id=$uid";


//echo $query;exit;


$userType=mysqli_query($linkid,$query);


$mydata=mysqli_fetch_assoc($userType);


?>


<div id="contentwrapper">


  <div class="main_content">


    <nav>


      <div id="jCrumbs" class="breadCrumb module">


        <ul>


          <li> <a href="#"><i class="icon-home"></i></a> </li>


          <li> <a href="#">Account Manager</a> </li>


          <li> <a href="#">Update My Account</a> </li>


        </ul>


      </div>


    </nav>


    <div class="row-fluid">


      <div class="span6">


	  <?php


		          	if(isset($_POST['submit']))


						{


						


						$name=$_POST['name'];


						$username=$_POST['username'];


						$email=$_POST['email'];


						$pass=$_POST['pass'];


						$password=base64_encode($pass);


						$usergroup=$_POST['usergroup'];


						//echo $code.$name.$prefix."Hello";				


						


						$query = "UPDATE ".$prefix."employee SET name='$name',username='$username',email='$email',password='$password' WHERE id=$uid";


						$result=mysqli_query($linkid,$query) or die(mysqli_error());		


						


						if($result){


						?>


						<div class="alert alert-success">


                                <a data-dismiss="alert" class="close">x</a>


                                <strong>Account </strong> is updated.


                            </div>			


						<?php 


						


						 }


						}


							


					 //unlink($filename1);


					 


						 unset($_POST);


						 $_POST['submit']='';


						 $_POST='';


					?>


        <h3 class="heading">Update Account </h3>


            <form class="form_validation_reg" id="form_validation_reg" action=""  method="post">


          <div class="formSep">


            <div class="row-fluid">


              <div class="span4">


                <label>Name<span class="f_req">*</span></label>


                <input type="text" name="name" id="name" class="span12" value="<?php echo $mydata['name'];?>" />


              </div>


              <div class="span4">


                <label>User Name   <span class="f_req">*</span></label>


                <input type="text" name="username" id="username" class="span12" value="<?php echo $mydata['username'];?>"/>


              </div>


            </div>


          </div>


		  <div class="formSep">


            <div class="row-fluid">


              <div class="span4">


                <label>Email Address</label>


                <input type="text" name="email" id="email" class="span12" value="<?php echo $mydata['email'];?>"/>


              </div>


              <div class="span4">


                <label>Password   <span class="f_req">*</span></label>


                <input type="password" name="pass" id="pass" class="span12" value="<?php echo $mydata['password'];?>" />


              </div>


            </div>


          </div>


		            


          


          <div class="form-actions">


            <input class="btn btn-inverse" name="submit" type="submit" value="Update Form" />


            <button class="btn">Cancel</button>


          </div>


        </form>


      </div>


    </div>


  </div>


</div>


