Posts

PHP Data Objetcts (PDO)

Image
PDO Tutorial

Xampp Customization

Image
Change Target Project Directory from httpd.conf File Path: C:\xampp\apache\conf\httpd.conf Change Target Project Directory from httpd.conf File Path: C:\xampp\php\php.ini post_max_size, upload_max_filesize, max_exexution_time, max_input_time, memory_limit, max_allowed_packet

Image Gallery Codepen

HTML Code width JQuery Script <!--<div class="wrapper">   <div class="images">     <img src="https://source.unsplash.com/1600x900/?rainforest" />     <img src="https://source.unsplash.com/1600x900/?trees" />     <img src="https://source.unsplash.com/1600x900/?rocks" />     <img src="https://source.unsplash.com/1600x900/?mountains" />     <img src="https://source.unsplash.com/1600x900/?water" />     <img src="https://source.unsplash.com/1600x900/?nature" />   </div>   <div class="text">     <p>Click the images.</p>   </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script type="text/javascript">   $(".images img").click(function () {   $(this).addClass("zoom"); }); $(".images img").mouseleave

MySql Joins Fetch Data

Image

Complete Class to Insert Data and Upload Image in PHP OOPS

<?php require('config.php'); class kaamdhenu extends config{              private $preparequery, $executequery;          public function setter(){              $this->executequery = mysqli_query($this->conn,$this->preparequery);              }          function registeruser(){         $this->preparequery = "INSERT INTO kaamdhenu_users(firstName,lastName,password,email,phone,gender,sec_question,sec_answer) VALUES ('".$_POST['fname']."', '".$_POST['lname']."','".$_POST['password']."',         '".$_POST['email']."','".$_POST['phone']."','".$_POST['gender']."','".$_POST['squestion']."','".$_POST['sAnswer']."')";$this->setter();                  if($this->executequery){             echo "Successfully Registered";         }               

Image Upload PHP Core or OOPs

'jobseeker_photo' is the name  of the input  $file = $FILES['jobseeker_photo'];                  $fileName = $_FILES['jobseeker_photo']['name'];         $fileTmpName = $_FILES['jobseeker_photo']['tmp_name'];         $fileSize = $_FILES['jobseeker_photo']['size'];         $fileError = $_FILES['jobseeker_photo']['error'];         $fileType = $_FILES['jobseeker_photo']['type'];                  $fileExt = explode('.', $fileName);         $fileActualExt = strtolower(end($fileExt));                  $allowed = array('jpg', 'jpeg', 'png');                         if(in_array($fileActualExt, $allowed)) {             if($fileError === 0){                 if($fileSize < 1000000) {                     $fileNameNew = uniqid('', true).".".$fileActualExt;                     $fileDestination = 'uploads/'.$fileNameNew;                     move_u