Posts

Session With Login

<?php require_once( 'db.php' ); global $conn,$db; // If form submitted, insert values into the database. //1st step data get with method.... if (isset($_POST[ 'login_submit' ])){ $email = $_POST[ 'email' ]; $password = $_POST[ 'password' ]; //2nd step query insert and check the connection..... $sql_query = " SELECT * FROM `register` WHERE email = '$email' " ; $query = mysqli_query($conn,$sql_query) or die ( 'Please check mysqli:' .$sql_query); //3step result check in num rows with condition.... $result = mysqli_num_rows($query); if ($result > 0 ){ $rows=mysqli_fetch_array($query); $db_password=$rows[ 'password' ]; if (md5($password) == $db_password){ $_SESSION[ 'login_name' ] = $email; header( "Location: fetch_data.php" ); } else { $_SESSION[ 'msg' ] = 'password not match.' ; ...

task ajax

 1. json_encode 2. __dir__ 3.

Image upload in CI with Ajax

Controlar==> public function Register(){ $data[ 'main_content' ] = 'ajax' ; $this ->load->view( 'partials/header' ,$data); $this ->load->view( 'ajax' , $data); $this ->load->view( 'partials/footer' ,$data); } public function register_post(){ $target_dir =dirname(dirname( __dir__ )) . "/uploads/" ; $target_file = $target_dir . basename($_FILES[ "image" ][ "name" ]); $filetmp_name = $_FILES[ "image" ][ "tmp_name" ]; if (move_uploaded_file($filetmp_name, $target_file)) { $set=array( 'data' => 'uploooo' , 'status' => '1' , ); echo json_encode($set); } else { $set=array( 'data' => 'image is not uploded' , 'status' => '0' , ); echo jso...

What is Helper And Liabrary In C.I

  What is Helper And Liabrary=> 1.Helper=>Helper mai hum wahi functaion cll krate hai jise hum kahi v data nikal sakte hai 2.Liabrary=>liabrary mai hum jo function lete hai uske lie class ki jrurt hoti hai data get krane k lie class dena pdta hai

LOGO AND SMS SEND TO EMAIL

  Controler SMS with logo send  $to = $this->input->post('email'); $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n"; $headers .= 'From: cloudhash <info@cloudhash.live>' . "\r\n"; $subject = 'Thank you for joining the cloudhash..'; $message = "<html><head></head><body>"; $message .= '<img src="'.base_url().'/assets/images/311.png"></body></html>'; $message .= ' Respected <b style="color:orange">'.$this->input->post('f_name').'</b><br> Your OTP is '.$otp.' Thank you for joining the cloudhash..<br> Looking forward to a continuous and a fruitful business partnership with you. <br> Regards, <br> cloudhash'; mail($to,$subject,$message,$headers);

Wordpress notes

  WordPress    1.appearance =>menus=>(category). 2.appearance=>theme editor => css.

Laravel vs CodeIgniter: Which is Better?

Image
  Laravel vs CodeIgniter: Which is Better? What is Laravel? Laravel is an open-source widely used PHP framework. The platform was intended for the development of web application by using MVC architectural pattern. Laravel is released under the MIT license. Therefore its source code is hosted on GitHub. It is a reliable PHP framework as it follows expressive and accurate language rules. What is CodeIgniter? CodeIgniter is a powerful PHP framework. It is built for developers who like a simple and elegant toolkit to create full-featured web applications. CodeIgniter is one of the best options for creating dynamic websites using PHP. It provides complete freedom for the users as they don't need to depend on the MVC development pattern. Moreover, it allows third-party plugins which can be useful to implement complicated functionalities. It also offers awesome security and encryption procedures. Why use Laravel? Laravel offers version control system that helps with simplified management ...