A programmer's paradise created by the twist of deliberated fantasies, and actions of a determined imagination.
Follow ME:
If you would like to make an appoinment, contact ME directly via my email address at tuso@programmerspride.com.

Add to Google
jQzoomer is a jQuery plugin extension to zoom an image. Check out the demo page for the installation instructions at http://jqzoomer.strongtechsol ...
It will still work unless the page is reloaded.
Consider the code below.

<script type="text/javascript" src="jquery-1.4.2.min.os.js"></script>
<script type="text/javascript">
function Test() {

<input type="button" value="DOM Click" onclick="Test()" /><br />
<input type="button" id="btn" value="JQUERY Click" />
After disabling JavaScript, the second button will still prompt the message "Hello" since it was cached.
HEREDOC and NOWDOC are two robust ways in displaying contents in your document.

heredoc text behaves just like a double-quoted string. In a double-quoted string, the parser will greedily take as many tokens as possible to form a valid variable name when a dollar sign ($) is encountered.

heredoc syntax:
$str = <<<EOF
Your content here ...
NOTE: EOF there is your identifier and can be named to anything. Demonstrating the heredoc's power:
$greeting = 'Hello';
$str = <<<MYDOC
$greeting Philippines !!!
Mabuhay !!!

echo $str;
Output: Hello Philippines !!! Mabuhay !!! nowdoc as of PHP 5.3.0 behaves just like heredoc but without parsing the content. Meaning, if you want to display a block of static text then it's much faster to use nowdoc because a greedy string-parsing process will not be made. nowdoc syntax:
$str = <<<'EOF'
Your content here ...
IMPORTANT: Do not indent the closing identifier.
Platform: XAMPP in windows' Localhost (
Limiting a Cookie's availability on specific directories.

If you want to set a cookie which is only accessible to a specific directory then
you cannot just write the example code shown below:
setcookie('mydir_cookie_only', 'Acess OK', time() + 3600, '/mydir/');
Do this instead:
setcookie('mydir_cookie_only', 'Acess OK');
setcookie('mydir_cookie_only', 'Acess OK', time() + 3600);
setcookie('mydir_cookie_only', 'Acess OK', time() + 3600, '/mydir/');
You need to extract the code and call it inside that directory. In our example, the directory is named mydir. So the code should be written in a PHP script inside mydir before executing it. If you fail to execute the code inside mydir then even in the presence of the path specification, the Cookie variable will be still accessible outside the specified directory.
When performing mathematical operations to decimal numbers, don't forget to validate the User input by the use of parseInt().

The syntax is parseInt(string, radix);

The second argument is optional, however in decimal this is very important. Forgetting to set the radix to base 10 won't correctly convert '08' to 8 and '09' to 9.

<script text="text/javascript">

var string = '08';
parseInt(string, 10);

Greetings, let me share you something about Perl & MySQL.

First things to know before you can work with MySQL databases in Perl is to ensure that the Perl's DBI and DBD-mysql modules are installed.

Installation of Perl modules / packages can be achieved easily by using ActivePerl - a software that can be found here : http://www.activestate.com/activeperl/.

Creating your MySQL module in Perl:
TIP: This is how we create a Class in Perl. 

When creating a Perl Module, the file name and the package name should be the same. And the extension should be pm.

So in this example, our Class should be saved as DBMySQL.pm.
package DBMySQL;

sub new {
my ($class, $database, $userid, $password) = @_;

my $self = {

_database => $database,
_userid   => $userid,
_password => $password,
_dsn      => "DBI:mysql:database=" . $database


bless $self, $class;
return $self;

sub open() {

my ($self) = @_;
my $dbh = DBI->connect($self->{_dsn}, $self->{_userid}, $self->{_password});
return $dbh;

Creating your display page in Perl: TIP: The first line of your display page should specify the correct path to where Perl is currently installed in your machine. When using a Web Server, the default path should be #!/usr/bin/perl. You can name your file to any names with cgi or pl as it's main extension. Thus, in this file we can call it topics.cgi or topics.pl.
#!"C:\Program Files\xampp\perl\bin\perl.exe"

use CGI;
use DBI;
use strict;
use DBMySQL;

print CGI::header();

my $db = new DBMySQL("perl_forum", "root", "");
my $mysql = $db->open();

my $query = $mysql->prepare("SELECT `title`,`content`,`dt_created` FROM `topics`");

print "We got " . $query->rows . " shouts and still counting ...<br><br>";

my $html_form = "";

while(my @row = $query->fetchrow_array()) {

	my($title, $content, $date) = @row;
	print $title . "<br />" . $date . "<br />" . $content . "<br><br>";


print $html_form;
I decided to go back and learn PERL again ...

First things to remember when writing your script:

1. Don't forget the path where PERL is installed in your machine.
2. Secondly, don't miss the content-type of the script in the second line.

Example, since I'm using XAMPP, my script looks like this ...
#!"C:\Program Files\xampp\perl\bin\perl.exe"
print "Content-type: text/html\n\n";
. . .
If you miss to start the output buffering, 
an error will occur when a previous output was
already started.


echo "Hello World !";

header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.new-url.com");