Get the full URL of your page using PHP PHP / General Development
Very often we need to have the ful URL of the page and use it somehow in our code, for example a dynamic script with social bookmarks or anything else we can think of. This can be done using Javascript but I prefer to use PHP since it's not based on the client side and it works with or without Javascript turned on in our browsers.
PHP Includes PHP / Functions
PHP has a very handy function called include(). This includes a page within the current page seamlessly. Whereas using iframes or frames in HTML is a separate page to the parent one. include() can be very useful for when you want to inclide content based on a certain topic.
Swap Images and Text with PHP PHP / Dynamic Images
As you can see, you can change the name of the models, and also the pictures without leaving the page. This is done using a simple PHP script that will carry GET parameters as part of the URL. The script will use these parameters to decide what name and what picture will appear on the page each time it is loaded.
Turning off Session IDs PHP / Sessions and Cookies
A session ID is a unique 32 character long string (usually) and is used by PHP sessions to track a specific user's session. This ID is needed on every page the session exists and hence is stored in a cookie and appended to the URL on the creation of a session.
Building Dynamic Pages With Search Engines in Mind PHP / CMS
Almost any developer knows that search engine placement is critical to the success of a web site. What many people don't know is that a lot of search engines cannot index many database-driven pages (basically any page with a '?' or '&' in the URL).
PHP Redirect PHP / Redirection
A PHP Redirect automatically transfers a web user from one URL to another. For example, typing foo.com in the browser automatically transfers the user to another URL bar.com.
Date and Time PHP / Date and Time
Most of the time, the date and time functionalities of PHP 5 are used for printing out the current date and timeto pretend that the web page is up to date (you would be surprised how many larger websites actually use this). But apart from that, working with date and time in PHP offers many other possibilities, most of which you will find in this chapter.
Making your first PHP page PHP / Miscellaneous
Creating a PHP page is very similar to creating an HTML page. There are two main differences between an HTML page and a PHP page, your PHP page will need to have a .php extension instead of .html, and you will use PHP code in your PHP page.
Using a page by page password system using mySQL PHP / Membership
One cool thing about php is that you can fairly easily validate users before displaying content on a page by page basis. Let's say you don't want to restrict the entire directory using htaccess, this is a neat alternative. Let's create a login system using PHP and mySQL.
URL Verification PHP / Network and Communication
Do you have a big list of links in your database that you want to display but only want to show ones that are still in existance? Well theres a very easy method for doing so. All you need is the fsockopen() function. Here is an example.
Creating a PHP Quiz Page PHP / Getting Started
PHP can be used to evaluate Quiz pages. The quiz page may be written in a normal form fashion, either multiple choice or True-false. After you create this form page, setting your PHP page as the action for the form, your php page can pick up the variables and evaluate the results of the form, scoring the form.