Skip to content
December 14, 2008 / ranacse05

Fixing position:fixed for IE

Today i was trying to code a fixed footer . It took very small time to code. And that works ok in FireFox but when i open that page in Internet Explorer it looks different . Here is the first code .

body {
padding:0 0 0 0 ;
border:1px solid #ccc;

#main {

<div id=”main”></div>

<div id=”c” align=”center”>

<div id=”footer”>Its Fixed !</div>


Then i try to fix this problem . The code below works in IE and the FF fine .

<!-- IE in quirks mode -->
padding:0 0 50px 0;
border-top:1px solid #ccc;
border-left:1px solid #ccc;
border-right:1px solid #ccc;
@media screen{
* html body{
* html div#content{

<div id="footer" align="center">

<div id="chat">

Content can be placed here......



<div id="content">

<span style="height:1300px"></span>


Nice hun ? 🙂

October 27, 2008 / ranacse05

Book Review : Learning PHP Data Objects

Learning PHP Data Objects, by Dennis Popel, is an introduction to PDO. I like this book. A real world example – Library management is here. Its very easy to read and understand.

This book is very much useful to the beginner of PDO. Dennis Popel discusses details of the PDO , In the beginning you will see how to connect the database using Mysql, Sqlite ,PG sql and with the PDO .

Then he start to discuss the details of the PDO using that Library Management project . There are some useful function in the book .

One of the most important chapter of this book is Chapter 3 : Error Handling , in this chapter you will found every kind of errors and how to handle them .

Next chapters are on the Prepare Statement , and Handling Rowsets , These chapters has also some nice example to understand the PDO .

Chapter 6 and 7 is very important. They named Advance PDO Usage and An Advance Example. There are also a lots of nice real world examples. But the main thing is every chapter is very much readable . Any learner will find it very much easy to understand .

All the example of this book follows the MVC of PHP. But when I saw there is a chapter named Introduction to OOP in PHP I just amazed ! This will help you a lot if u don’t have any idea about the OOP of PHP.

September 8, 2008 / ranacse05

Ajax Im in Bangla

Hello every body
I localized the AJAXIM chat software . Its an awesome software based on the AJAX .Very nice interface and very much use full.Lets see what the developer says

ajax im (“asynchronous javascript and xml instant messenger”) is a browser-based instant messaging client. It uses AJAX to create a near real-time IM environment that can be used in conjunction with community, intranet, and social websites. No refreshing of the page is ever needed for this “web application” to work, as everything is updated in real-time via JavaScript.

If you want to use the Bangle language pack just download it from AJAXIM Bangla . Just download it and after unzip the folder just copy that english folder inside the AJAXIM folder.

August 23, 2008 / ranacse05

Image Resizing with PHP

I was looking for a script that will resize the image automatically . This script resize the image . Here u have to supply a fixed value of width and i’ll resize the image .

// This is the temporary file created by PHP
$uploadedfile = $_FILES['uploadfile']['tmp_name'];

// Create an Image from it so we can do the resize
$src = imagecreatefromjpeg($uploadedfile);

// Capture the original size of the uploaded image


// this line actually does the image resizing, copying from the                            original
// image into the $tmp image

// now write the resized image to disk. I have assumed that you                            want the
// resized, uploaded image file to reside in the ./images subdirectory.
$filename = "images/". $_FILES['uploadfile']['name'];

imagedestroy($tmp); <code>// NOTE: PHP will clean up the temp file it created                            when the request
// has completed.

Note : I found the script here

July 27, 2008 / ranacse05

Book Review – I

Learning Facebook Application Development

Learning Facebook Application Development

Few days ago I got “Learning Facebook Application Development” from packt publication. This is an awesome book if you want to develop Facebook Application using PHP and MySQL

If you are new in PHP and MySQL you also can use this book. From the beginning to the end this book covers every ting. There are some very nice real-life examples too .

If you don’t have the idea about Facebook application you can know how does it works. How FBML,FBJS and Ajax works ? Every thing need for an application. Even the database ,API etc.

I was just surprised to see that there is also about Cron d. Actually it needs when u want to do some action after a certain time(e.g Like u want to reset the Profile information after every 30 mins)

There is an example shows how you can handle the multi-byte characters.

And there is also a chapter about the Feed. It’ll help you to publish the update information on the Feed.

But there is nothing about JavaScript BlackFace.

My rating is 4.5 out of 5.

July 8, 2008 / ranacse05

Get the Row Number in PDO

I was working on PHP Data Object (PDO) . But i saw that PDOstatement::rowCount()  does not return row number for mysql when u use the SELECT command . Then i found this function to get the row number after a SELECT query .

function getRowCount($sql)
$sql = trim($sql);
$sql = preg_replace(‘~^SELECT\s.*\sFROM~s’, ‘SELECT COUNT(*) FROM’,
$sql = preg_replace(‘~ORDER\s+BY.*?$~sD’, ”, $sql);
$stmt = $dbh->query($sql);
$r = $stmt->fetchColumn(0);
return $r;

Now call it like this

$sql = “SELECT name,email FROM user where userid=’$id’ “;
$totalBooks = getRowCount($sql);

This will return the effected row after the SELECT command .

June 30, 2008 / ranacse05

Got new Mobile

No new post for this month ! I’m damn busy with my exam so i cant post new topics here.I’ll be back soon.I just got my new mobile. Its Sony Ericsson k750i.Its not a new model but i love it so much.Few pictures below and the full information about the set is here.
Sony Ericsson K750i