## FOR DYNAMIC BREADCRUM:: filename = breadcrum.php; <?php class breadcrumb_class { var $breadcrumb = array(); function insertBreadcrumb($title,$path=”#”) { …
Read MoreHow to make dynamic breadcrum using segments
<?php // This function will take $_SERVER[‘REQUEST_URI’] and build a breadcrumb based on the user’s current path function getBreadcrumbs($separator = ‘ » ‘, $home = …
Read MoreForm validation using jQuery in php
## form validation in JQuery <script type=”text/javascript”> $(document).ready(function(){ $(‘#send_enquiry’).click(function(){ var get_validate = validateForm(); console.log(get_validate); if(get_validate>0){ return false; }else{ return …
Read MoreFacebook returned credentials after login in php
## FACEBOOK RETURN CREDENTIALS IF SUCCESFULLY LOGGED IN Facebook\GraphObject Object ( [backingDatarotected] => Array ( [name] => UserName [email] => UnserEmail [id] => …
Read MoreGet all child category under a category
## get all childs & their childs under a parent category //get all childs & their childs public function get_child_categories( $parent_id ){ $childtree = $this->nowbuild_child_tree($parent_id); …
Read MoreReset a form using jquery
## Reset a form using jQuery. <script> $(“#formid”).find(“input,textarea”).val(“”); </script>
Read MoreDownload a file in php
## Download file with a save option in php. $filename = “newfile.pdf”; $file_url = $filepath.$filename; //example: $file_url = ‘http://www.link.com/file.pdf’; header(‘Content-Type: application/octet-stream’); header(“Content-Transfer-Encoding: Binary”); header(“Content-disposition: attachment; …
Read MorejQuery click not working after append div
#Jquery: Click event doesn’t work after append. $(document).on(‘click’, ‘.’, function(e) //do whatever });
Read Morefibonacci in php
<?php if(!empty($_GET[‘upto’])){ $upto = $_GET[‘upto’]; }else{ $upto = “”; } function getfibo($upto=5){ $second =1; $first =0; $fibo_arr[] = $first; $fibo_arr[] = $second; for($i=1; $i<$upto; $i++){ …
Read MoreRouting using htaccess
RewriteEngine on RewriteBase / ###Maintainance ## RewriteRule ^maintainanace/$ maintain.php RewriteRule ^logout/$ logout.php RewriteRule ^logout$ logout.php RewriteRule ^products/([^/]*)/([^/]*)/$ products.php?slug=$1&id=$2 [L]
Read More