![]() |
Quality Web Hosting Business Directory |
PHP TipsEncoding form variables in a URL If you're putting form variables in a URL, you can get into strife when the user enters spaces or other non-alphanumeric characters in the form. Gary Winnick The way to convert their data to a URL compliant format is as follows:
Displaying filesize in kilobytes Here's a way to display a file's size in kilobytes (eg - 3,058 Kb):
Display currency in correct format If you need to display numbers in the correct currency format (eg - two decimal places $23.34), use the PHP function number_format:
Redirect a URL using PHP Redirecting to a new URL in PHP is done with the header() function. You must call this function before you output anything, otherwise the server automatically generates a header for you and the function won't execute. The command is used as follows:
|
| © Copyright 2006 GreatWebMasterWorld.com All Rights Reserved.| Free Smiley Packs | Idip Directory Bid | Motor Sports Blog |