Posts

model

  <?php defined ( 'BASEPATH' ) or exit ( 'No direct script access allowed' ); class my_model extends CI_Model {     public function insert_post ( $data )     {         $this -> db -> insert ( 'post' , $data );         if ( $this -> db -> affected_rows () > 0 ) {             return $this -> db -> insert_id ();         } else {             return false ;         }     }     public function get_category ()     {         $query = $this -> db -> get ( 'characters' );         return $query -> result ();     }     public function get_tag1 ()     {         $query = $this -> db -> get ( 'tags' );         return $query -> result ();  ...

htacess

  RewriteOptions inherit < IfModule mod_rewrite.c >     RewriteEngine On     RewriteBase /     # Redirect Trailing Slashes If Not A Folder...     RewriteCond %{REQUEST_FILENAME} !- d     RewriteRule ^ (. * ) / $ / $1 [ L , R = 301 ]     # Remove index.php from URL if present     RewriteCond %{THE_REQUEST} ^ [ A - Z ]{ 3 ,}\s /+ index\.php / [ ^ \s] * [ NC ]     RewriteRule ^ index\.php / (. * )$ / $1 [ R = 301 , L ]     # Redirect to HTTPS if not already (Optional: uncomment if needed)     # RewriteCond %{HTTPS} !=on     # RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]     # Handle front-controller for non-existing files and directories     RewriteCond %{REQUEST_FILENAME} !- f     RewriteCond %{REQUEST_FILENAME} !- d     RewriteRule ^ (. * )$ index.php / $1 [ L ] </ IfModule > < IfModule ...

If the current time is between 10 AM and 7 PM, the button is enabled; otherwise, it is disabled JAVASCRIPT code

 You can achieve this using JavaScript to disable or enable the button based on the current time. Below is an example code snippet to accomplish this: <!DOCTYPE html> <html> <head>   <title>Time-based Button</title>   <script>     function checkTime() {       var now = new Date();       var hours = now.getHours();       // Check if the current time is between 10 AM and 7 PM       if (hours >= 10 && hours < 19) {         document.getElementById("submitBtn").disabled = false; // Enable the button       } else {         document.getElementById("submitBtn").disabled = true; // Disable the button       }     }     // Call checkTime initially to set the initial state of the button     checkTime();     // Call checkTime every minute to keep updating t...

Unleashing the PHP Developer in You: How to Crack Any Interview with Confidence

Introduction: Embarking on a journey to crack a PHP developer interview can be both exhilarating and challenging. The world of coding and development is ever-evolving, and staying ahead in the game requires a combination of technical prowess and the right mindset. In this blog post, we'll explore strategies to boost your motivation and confidence, ensuring you can confidently crack any PHP developer interview at any company. Master the Basics: Before delving into the more complex aspects of PHP development, ensure that you have a strong grasp of the fundamentals. Understanding the core concepts, syntax, and best practices will not only build a solid foundation but also boost your confidence when facing technical questions in an interview. Reviewing basic PHP concepts regularly will help you recall information effortlessly during the interview. Showcase Your Projects: Nothing speaks louder than a well-executed project. Build a portfolio that showcases your practical ski...