Home Live Support Help Center FAQ Terms Contact Us
 

CATEGORIES

Some Cool CSS and PHP Tricks



To clear the values of a text input box


Add this to your input fields to clear the text box:

Example: (click inside the input box and the text should automatically disappear. Much nicer than making your visitors delete any existing values inside the box themselves.)

Change cell background color onmouseover


To use onmouseover command to change the background color of <td> table cells when visitors place their cursor over the cell (hover):


Example:
Hold your mouse over this cell





Change text of links in status bar


To modify the text shown in the status bar when a visitor places their cursor over links (hovers) using onmouseover (useful for hiding really long, ugly affiliate links):

Link Example (watch status bar below)


Replace the standard form submit button with an image


Replace the standard form submit button with an image

PHP

To replace text throughout your site


For example, if you want to change all "&" symbols to the word "and" in titles ($title) on your site:


If you need to change a lot of words or symbols, you can create an array function. This is really useful if you have an affiliate site and need to change a merchant's description to avoid search engine penalties.


Then somewhere on the page where you would like the text replaced:


or
if the text is being pulled from a database or defined elsewhere:



To automatically display monthly announcements on your site


Great if you want to display scheduled promotions or announcements on a monthly basis.

At the top of your page (with the php tags) or in a separate file such as functions.php:

Then add this on your page where you want the announcements to appear:


To display today's day


Today's Date is Saturday Jul 31st 2010


Then add this on your page where you want the date to appear:
© 2003-2006 PHP Website Templates All rights reserved.