Create a Skinnable Interface with PHP

Have you ever run across a user who just has to have every blog he reads appear in his own personal color scheme? Are you that kind of user? Thankfully, supporting these users is far easier with CSS support in modern browsers.

CSS defines the fonts, colors, sizes, and even positions of elements of a page independent of the HTML code for that page. You can change the look of a single HTML page drastically simply by redefining its CSS stylesheet. This hack shows how to provide user-selectable CSS and offers some advice on creating customizable interfaces.

The XHTML Code

< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ""&gt;
<html xmlns=""&gt;
< ?php
$style = "default";
if ( $_GET["style"] )
$style = $_GET["style"];
$files = array( );
$dh = opendir( "styles" );
while( $file = @readdir( $dh ) )
if( preg_match( "/[.]css$/", $file ) )
$file = preg_replace( "/[.]css$/", "", $file );
$files []= $file;
<style type="text/css" media="all">@import url(styles/< ?php echo($style); ?>.css);</style>
<title>Custom Style With PHP</title>
<div id="wrap">
<div id="h">
<h1>Custom Style With PHP</h1>

<div id="left">
<ul class="menu">
<li><div class="menu-active"><a href="home.php">Home</a></div></li>
<li><div class="menu-inactive"><a href="faq.php">FAQ</a></div></li>
<li><div class="menu-inactive"><a href="contact.php">Contact</a></div></li>

<div id="right">
Important information

<div class="box-content">
Lots of information about important events and

<br class="clear" />
<div id="foot">
<h3>Select Style:</h3>
<select name="style">
< ?php foreach( $files as $file ) { ?>
<option value="<?php echo($file); ?>"
< ?php echo( $file == $style ? "selected" : "" ); ?>>< ?php echo($file); ?> +++++++>&nbsp;&nbsp;
< ?php } ?>
<input type="submit" value="Select" />

<!-- End Wrap -->

Continue reading

Posted in How To, PHP | 2 Comments

Free Automated Backups from iDrive

iDriveThe which majority of the people make nowadays by wanting with protection their crucial data and sensitive files are by obtaining an external hard order or transferring the files in CD. While it is a very convenient and proven manner, it is still not the surest manner. These things can be damaged in unhappy events like a fire of a flood or it could be stolen if you office or houses are broken in. While it is still recommended to have protections in these formats, won’t it be better and surer also with protection all these files crucial with a service of protection on line like protection on line of IDrive-E Online Backup? They is doubles your protection.

It is like supporting your protections. Protection on line of IDrive-E Online Backup offers 2 versions of protections. One which is very convenient and accessible is basic IDrive-E Online Backup which offers a memory capacity of 2 gigaoctets free. It is good for bloggers and small time clerks like us. The other version that the small businessmen and the people of the best costumes which have a good number of files is the pro version of IDrive-E Online Backup.

This version offers unlimited storage for a sum symbolic system right of $4.95 per month. If you choose the annual plan, it is only $49.50 per annum and on this, you have 2 months of free storage. Protection on line of IDrive-E Online Backup offers a crowd of devices which are unequalled by other services of protection on line. It is blocked and reliable with it is the devices at end high and in a more important way it is very easy to use. A demonstration of protection on line of IDrive-E Online Backup is available to their Web site if you are interested to discover more.


Posted in Internet, Reviews | 1 Comment

Create Pop-Up Hints with PHP

Use the overLIB library to pop up hints for words on your web page using JavaScript and PHP.

With the overLIB JavaScript library , you can have handy pop-up labels that appear above text on your page. This hack makes it a little easier to create these links by providing a PHP wrapper function to invoke the library.

Complete Code

Save the code shown as pop-up.php.

A wrapper function that simplifies overLIB use, courtesy of PHP

function popup( $text, $popup )
<a href="javascript:void(0);" onmouseover="return overlib('<?php echo($popup); ?>
');" onmouseout="return nd();"><?php echo($text); ?></a>
<script type="text/javascript" src="overlib/overlib.js"><!-- overLIB (c) Erik Bosrup -->
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;">
With PHP, we can combine with some javascript to make small popups. <br />Just hover your mouse on <?php popup(
'me', 'And this is The Hover Text.<br/>Looking Wonderfull ha?.'
); ?>. It's work ^_*.

You could also put the wrapper function into a PHP library, include that library in your PHP pages, and turn this into a nice, reusable utility function.

Test Your Code

Download and unpack the overLIB library into your web server’s documents directory. Then add in the pop-up.php file and test it on your browser, You should see something similar

PHP Popups Screen shoot 1

Next, move the mouse over the word me, and you will see the pop up appear, which gives you a little more information about me

PHP Popups Screen shoot 2

This pop up can be as elaborate as you like, with images, tables, different fonts, styles, and whatever else you want it.

Posted in How To, PHP | Tagged , , , , | 8 Comments

NFL Sunday Ticket Offer only from DIRECTV

Interested in football? Then you really have to take this one! Get DIRECT TV NFL Sunday Ticket Deal and you will be able to see up to 200 NFL games!
So if you’re a fan, this is a must buy. Make sure you gather around all your friends each Sunday to watch your favorite games!

We have also which people call the direct TV here and we have all sports channel and from the film channels like HBO and very safe us never will not have it who good as my friends in the states. They obtain to observe the NFL each Sunday, and up to 14 matches with that, because they have what we do not have here and that is DIRECT TV NFL Sunday Ticket Deal.

We must be satisfied with all matches that we see 1 or for 2 months after the matches were played. Direct to hold the first role the TV, an authorized direct retailer of TV packed up a good number of great offers with packages beginning $29.99 per month if the order placed now. People where the direct TV is available, to check their Web site at

Posted in Internet, Reviews | 2 Comments

Dynamic Variables in PHP

Almost Five years I was use PHP as my Web Server Scripting Languange for my Web Application, from simple application until more robust application. And like other Web Server Scripting Languange, there are some variables function that really useful to make my PHP code more usable and easy to understand, one of my favorites is dynamic variables.

How to use dynamic variables in PHP? use my simple tutorial.
Sometimes it is useful to set and use variables dynamically. Normally, you assign a variable like this:

$var = "hello";
Now let’s say you want a variable whose name is the value of the $var variable. You can do that like this:

$$var = "World";

PHP parses $$var by first dereferencing the innermost variable, meaning that $var becomes “hello”. The expression that’s left is $”hello”, which is just $hello. In other words, we have just created a new variable named hello and assigned it the value “World”. You can nest dynamic variables to an infinite level in PHP, although once you get beyond two levels, it can be very confusing for someone who is trying to read your code.
Continue reading

Posted in PHP | Tagged , , , , , | 18 Comments

eHarmony Dating Tips from is a love and a Romance Web site for each one. Each one needs love. Even the king must have the love or there will be no heir with his throne. There are many articles written well here, like articles on the way in which to write love letters, which is the best romantic ideas on the way in which to pass this evening with your love those.

As for chooses, you can even obtain dating councils eHarmony right in addition to Web site, for men and women the site was made simple. It is so easy to direct to that even somebody who is not either familiar using the computer knows where to click. The size of police force is simply nice for the eyes and facilitates the reading.

The articles are matched consequently and in the places where one can see any matter heading immediately. I added some of the bonds am here for your with fast access. For a collection of love letters and romantic stories, romantic letters of love. Ideas to develop your love and to increase your ideas of phase and romantic romance. To date inclines eHarmony for the men, for women.

Posted in Internet, Reviews | 13 Comments
Page 168 of 196← First...1020...167168169...180190...Last →