/home/hdwebsolution/public_html/ns-interior/admin-pages/update-home-about.php
<?php include('site-header.php'); ?>
  <!-- end of LOGO CONTAINER -->
  <!-- - - - - - - - - - - - - -->
  <!-- start of SIDEBAR        -->
  <!-- - - - - - - - - - - - - -->
<?php include('left-nevigation.php'); ?>
  <!-- - - - - - - - - - - - - -->
  <!-- end of SIDEBAR          -->
  <!-- - - - - - - - - - - - - -->
  <main id="playground">
  <script src="ckeditor/ckeditor.js"></script>
    <!-- - - - - - - - - - - - - -->
    <!-- start of TOP NAVIGATION -->
    <!-- - - - - - - - - - - - - -->
    <nav class="navbar navbar-top navbar-static-top">
      <div class="container-fluid">
        <!-- sidebar collapse and toggle buttons get grouped for better mobile display -->
        <div class="navbar-header nav">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-top"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
        </div>
        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="navbar-top">
          <ul class="nav navbar-nav navbar-right">
            <li class="dropdown user-profile"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
              <div class="user-img-container"> <img src="demofiles/demoimage.gif" alt=""> </div>
              Sign Out <span class="chat-status success"></span> </a> </li>
          </ul>
        </div>
      </div>
      <!-- end of container-fluid -->
    </nav>
    <!-- - - - - - - - - - - - - -->
    <!-- end of TOP NAVIGATION   -->
    <!-- - - - - - - - - - - - - -->
    <!-- PAGE TITLE -->
    <section id="page-title" class="row">
      <div class="col-md-8">
        <h1>Home About Us</h1>
        <p class="lead">Update your Home About Content below</strong>.</p>
      </div>
      <div class="col-md-4">
      </div>
    </section>
    <?php
    extract($_POST);
     $image_names=$_FILES['att']['name']; 
     $about_image= time()."_".$image_name;
     $tmp = $_FILES['att']['tmp_name'];
 if(isset($_POST['Update']))
    {
        if($_FILES['att']['name']!="")
        {
            if(mysqli_query($link,"update tbl_home_about set introduction='$introduction',`title2`='$title2',`title3`='$title3',`title4`='$title4',`title8`='$title8',`image`='$about_image' where id=1"))
            {
              move_uploaded_file($tmp,"../about-image/$about_image");
              $img = "<p style='color:green;'>Image Upload successfully!!!!!</p>";
            }
        }
        else
        {
          if(mysqli_query($link,"update tbl_home_about set introduction='$introduction',`title2`='$title2',`title8`='$title8',`title4`='$title4',`title3`='$title3' where id=1"))
            {
              $img = "<p style='color:green'>Successfully Update...</p>";
            }
        }
    }
    ?>
    <!-- / PAGE TITLE -->
    <?php 
    $sqlUp="select * from tbl_home_about where id=1";
    $dataup=mysqli_query($link,$sqlUp);
    $updtRslt=mysqli_fetch_array($dataup);
    ?>
    <div class="container-fluid">
      <div class="row"><?=@$img;?></div>
      <form method="post" enctype="multipart/form-data">
        <div class="row">
          <div class="col-md-4">
            <section class="panel tasks-widget">
              <img src="../about-image/<?=$updtRslt['image'];?>" width="100%" height="260px">
              <!-- <label>Image Size about us(411 X 400) Pixel:</label> -->
              <input type="file" name="att">

            </section>
        </div>

          <div class="col-md-12">
     
            <input type="text" class="form-control" name="title3" value="<?=$updtRslt['title3'];?>" placeholder="Title  ">
 <label>Description</label>
            <section class="panel tasks-widget">
                <textarea id="ckeditor1" name="introduction"><?php echo $updtRslt['introduction']; ?></textarea>
            </section>
           <label>How we do this</label>
             <section class="panel tasks-widget">
                <textarea id="ckeditor2" name="title8"><?php echo $updtRslt['title8']; ?></textarea>
            </section>
           <label>What we believe
</label>
           <section class="panel tasks-widget">
                <textarea id="ckeditor3" name="title2"><?php echo $updtRslt['title2']; ?></textarea>
            </section>
             <label>Experience
</label>
           <input type="text" class="form-control" name="title4" value="<?=$updtRslt['title4'];?>" placeholder="Innovative">
          </div>
          <br><br>
          

        <div class="col-md-12"><div class="text-center"> 
        
          
        <button name="Update" class="btn btn-primary" style="width:100%;">Submit</button> </div></div>
        </div>
      </form>
     <script type="text/javascript">
      CKEDITOR.replace(ckeditor1)  
      CKEDITOR.replace(ckeditor2)  
      CKEDITOR.replace(ckeditor3)  
    </script>
    <!-- / container-fluid -->
 <?php include('site-footer.php'); ?>