Saturday, October 31, 2015

document ready in javascript - alternative to $(document).ready

There are many Answers available for the above question on the following URL.

http://stackoverflow.com/questions/2304941/what-is-the-non-jquery-equivalent-of-document-ready

Friday, October 9, 2015

PNG to JPG - Conversion and Compression - PHP






Code is below:

<?php

if(isset($_POST['submit'])){

$target_dir = "uploads/";
$target_file = $target_dir . basename($_FILES["myfile"]["name"]);
$uploadOk = 1;
$imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);

move_uploaded_file($_FILES["myfile"]["tmp_name"], $target_file);

$filePath = './uploads/'.basename( $_FILES["myfile"]["name"]);
$image = imagecreatefrompng($filePath);
$bg = imagecreatetruecolor(imagesx($image), imagesy($image));
imagefill($bg, 0, 0, imagecolorallocate($bg, 255, 255, 255));
imagealphablending($bg, TRUE);
imagecopy($bg, $image, 0, 0, 0, 0, imagesx($image), imagesy($image));
imagedestroy($image);
$quality = 50; // 0 = worst / smaller file, 100 = better / bigger file

$image_name = str_replace('.png','',$filePath);

imagejpeg($bg, $image_name . ".jpg", $quality);

imagedestroy($bg);


}


?>




<form action="" enctype="multipart/form-data" method="post">
         <input type="file" name="myfile" value="" >
         <input type="submit" name="submit" >
</form>

Sunday, July 26, 2015

PHP MYSQL Advance Course Structure


  • Introduction to advance programming
  • basic php techniques
  • introduction to Object oriented programming
  • Object oriented programming in practice
  • Project Setup (creating directories etc, creating MYSQL database)
  • Creating database class, User class, session class etc
  • admin login and account management
  • Working with the files and directories
  • uploading files 
  • Completing User Class - CRUD
  • Ajax in practice
  • Introducing E-commerce
  • Database designing
  • Working with the Products class
  • Displaying Products on frontend with Pagination
  • Searching , Advance Search
  • Creating Cart
  • updating Cart
  • checkout process
  • Products Reviews/Rating ,commenting
  • Contact Us, Working with Emails
  • MVC Basics

Almost 35 Lectures  . 
Total Course Price $250
Single Lecture $10

Contact:

     Skype:      phptutor@hotmail.com
     facebook: mrfuad2007@gmail.com




Fee Structure

Html and css combine lectures = $120
javascript =  $150
jQuery     =  $100
Basic level of php mysql = $180
Advance level of PHP mySQL (Ajax included) = $250
Codeigniter = $150

PHP MYSQL BASICS COURSE STRUCTURE


  • Overview
  • WAMP/XAMP Installation
  • First Start
  • Exploring Datatypes (variables, constants, strings, functions, arrays etc)
  • Logical Expressions
  • Loops
  • User defined functions
  • Debugging
  • Building Web Pages
  • MySQL Basics
  • Building Content Management system
  • Building Back-end admin side - Application CRUD (create, read, update , delete)
  • Building Front-end
  • Tests , Tests Results , Guideline after Tests , Tips and tricks
Almost 25 Lectures  . 
Total Price $180
Single Lecture $10

Contact:

     Skype:      phptutor@hotmail.com
     facebook: mrfuad2007@gmail.com