## FOR DYNAMIC BREADCRUM:: filename = breadcrum.php; <?php class breadcrumb_class { var $breadcrumb = array(); function insertBreadcrumb($title,$path=”#”) { …
Read MoreCodeIgniter
Form 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 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 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 MoreShow location in Google map using php
<?php $location=”Kolkata”; ?> <div style=”width: 100%”> <iframe width=”100%” height=”480″ frameborder=”0″ scrolling=”no” marginheight=”0″ marginwidth=”0″ src=”https://maps.google.it/maps?q=<?php echo $location;?>&output=embed”></iframe> </div>
Read MoreImage upload in php
#IMAGE UPLOAD if ($_FILES[‘list1’][‘name’] != “”) { $allowed_ext = array(“jpg”, “jpeg”, “png”, “gif”); $extension = explode(‘.’, $_FILES[“list1”][“name”]); $ext = strtolower(end($extension)); if (in_array($ext, $allowed_ext)) { $newname …
Read MoreOn delete Cascade in php
## On Delete one main table data ,delete related others table data. ALTER TABLE Courses ADD FOREIGN KEY (CatCode) REFERENCES Categories(Code) ON DELETE CASCADE;
Read MoreSql-. On delete Cascade in sql
#ON DELETE CASCADE IN SQL Cascade will work when you delete something on table Courses. Any record on table BookCourses that has reference to table …
Read MorePhp-Get image name and extension
<?php $image = “glass.jpg”; //Getting image name $img_name = pathinfo($image, PATHINFO_FILENAME); //Getting image extension $img_ext = pathinfo($image, PATHINFO_EXTENSION); ?>
Read More