Tag: php

  • Hack your open cart pagination library to enable AJAX calls

    Okay, I just faced and solved an very interesting problem and can’t wait to share with you all. PROBLEM: I was trying to do pagination calls by ajax as my whole project  architecture is like that. But open cart’s pagination do not by default support ajax call. I’ll go step by step through the solution. Pagination class…

  • Change base url of your magento application (And a bonus problem!)

    Starting work with magetno (eCommerce platform). I installed the framework defining the base url as “localhost“. Everything was OK  but yet i was unable to login to admin panel. I even tried changing password in database (Changing the original password to md5 hash). I just figured out that magento requires “.” in the host name (it should…

  • New Website Developed

    Very recently I developed website for an software firm of Bangladesh called tetra soft. (www.tetrasoft.com.bd) Tetra Soft was developed to help business organizations running properly in the world of globalization. For these responsibilities and challenges, Tetra Soft is applying its acquired knowledge, skills, experience, expertise and professionalism. The firm is one of the best solution…

  • Using colorbox(a jquery plugin) ajax in a complex situation

    Colorbox is a lightweight customizable lightbox plugin for jQuery. I am using colorbox for another perpose: to show a (semi!) modal window to show information on ajax call. You can get the plugin here . Here I’ll give a simple example how to load ajax data and show through colorbox plugin. In second phase i’ll…

  • jQuery Ajax Tooltip

    This is very much based on the Coda Popup Bubble example for jQuery that’s been going around with a few important differences: The information is requested via AJAX, so you don’t have to include all of this extra information in a hidden div. This keeps your markup smaller for grids with tons of names in…

  • Php page redirection problem

    So far i did web development I used javascript redirection. But recently i needed to do that with php. But i got stacked with some annoying problems. 1. Headers are already sent. 2. SESSION variables are not setting. 1. Ok, now here javascript again rescue me see how. function redirect($url) { if(!headers_sent()) { //If headers…

  • A nice script to upload a image and re-sizing them

    MAX_SIZE*1024){ echo “You have exceeded the size limit”; $errors=1; } if($extension==”jpg” || $extension==”jpeg” ){ $uploadedfile = $_FILES[‘file’][‘tmp_name’]; $src = imagecreatefromjpeg($uploadedfile); } else if($extension==”png”){ $uploadedfile = $_FILES[‘file’][‘tmp_name’]; $src = imagecreatefrompng($uploadedfile); } else { $src = imagecreatefromgif($uploadedfile); } list($width,$height)=getimagesize($uploadedfile); $newwidth=60; $newheight=($height/$width)*$newwidth; $tmp=imagecreatetruecolor($newwidth,$newheight); $newwidth1=25; $newheight1=($height/$width)*$newwidth1; $tmp1=imagecreatetruecolor($newwidth1,$newheight1); imagecopyresampled($tmp,$src,0,0,0,0,$newwidth,$newheight,$width,$height); imagecopyresampled($tmp1,$src,0,0,0,0,$newwidth1,$newheight1,$width,$height); $filename = “images/small/”. $_FILES[‘file’][‘name’]; $filename1 = “images/small/”. $_FILES[‘file’][‘name’]; imagejpeg($tmp,$filename,100); imagejpeg($tmp1,$filename1,100);…

  • Change default username and/or password of phpMyAdmin in xampp

    If you want to change  default username and/or password of your xampp for any reason like my one(Using different mySql already installed in my machine ).  You simply do the following. 1. Open phpMyAdmin’s config file. In my case I’am using xampp-1.7.4 the config file named config.inc.php in ../xampp/phpMyAdmin/. 2. Check if $cfg[‘Servers’][$i][‘auth_type’] = ‘config’ if it’s not ‘config’…