<?php  
$row_profile=$this->db->where('c_id',$this->session->userdata('user_id'))->get('customer')->result_array();
?>
<div class="profilePageSec">
	<div class="container">
		<div class="row">
			<div class="col-lg-3 col-md-3"></div>
			<div class="col-lg-6 col-md-6 col-xs-12">
				<div class="section-tittle">
                    <h2>My Profile</h2>
                    <hr>
                 </div>

                 <div class="profileTextD">
                    <div class="profileTextDsub">
                        <h4><span>Name:</span> <?php echo $row_profile['0']['name']; ?></h4>
                        <h4><span>Mobile:</span> <?php echo $row_profile['0']['mobile']; ?></h4>
                        <h4><span>Email ID:</span> <?php echo $row_profile['0']['email']; ?></h4>
                        <h4><span>State:</span> <?php echo $row_profile['0']['state']; ?></h4>
                        <h4><span>City:</span> <?php echo $row_profile['0']['city']; ?></h4>
                        <h4><span>Full Address:</span> <?php echo $row_profile['0']['address']; ?></h4><br>
                        <form method="post" role="form" id="profile_form">
                        <div class="editProfileD" id="editProfileD">
                            <div class="row">
                                <div class="form-group">
                                    <div class="col-md-12 col-sm-12 col-xs-12">
                                        <input type="text" name="name" id="name" class="form-control" placeholder="Full Name" required="" aria-required="true" value="<?php echo $row_profile['0']['name']; ?>"><br>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-md-6 col-sm-6 col-xs-12">
                                        <input type="email" name="email" id="email" class="form-control" placeholder=" Enter Your Email" required="" aria-required="true" value="<?php echo $row_profile['0']['email']; ?>"><br>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <div class="col-md-6 col-sm-6 col-xs-12">
                                        <input type="text" name="mobile" id="mobile" class="form-control" placeholder=" Enter Your Mobile No" required="" aria-required="true"  value="<?php echo $row_profile['0']['mobile']; ?>"><br>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-md-6 col-sm-6 col-xs-12">
                                        <input type="text" name="state" id="state" class="form-control" placeholder=" State" required="" aria-required="true" value="<?php echo $row_profile['0']['state']; ?>"><br>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <div class="col-md-6 col-sm-6 col-xs-12">
                                        <input type="text" name="city" id="city" class="form-control" placeholder=" City" required="" aria-required="true" value="<?php echo $row_profile['0']['city']; ?>"><br>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <div class="col-md-12 col-sm-12 col-xs-12">
                                        <textarea class="form-control" name="address" id="address" placeholder="Your Full Address" rows="4" required="" aria-required="true" ><?php echo $row_profile['0']['address']; ?></textarea><br>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <a href="<?php echo base_url(); ?>user/logout/" class="btn btn_yellow" type="button">Logout</a>
                        <button class="btn btn_brdr" type="button" id="edtP"> Edit Profile</button>
                        <button class="btn btn_brdr" type="submit" id="updatID">Update</button>
                        </form>
                    </div>
                    </div>

			</div>
		</div>
	</div>
</div>


<script>
$(document).ready(function(){
  $("#edtP").click(function(){
    $("#editProfileD").show();
    $("#edtP").hide();
    $("#updatID").show();
  });
});
</script>