PHP Classes

File: example.advanced.php

Recommend this page to a friend!
  Classes of Joshua Townsend   Request Data   example.advanced.php   Download  
File: example.advanced.php
Role: Example script
Content type: text/plain
Description: Example of more advanced use
Class: Request Data
Retrieve and process request parameters
Author: By
Last change:
Date: 17 years ago
Size: 445 bytes
 

Contents

Class file image Download
<?php
// Slightly more advanced examples of use
require "request.class.php";

$request = new request();

$name = $request->get_clean_string("name"); // Get the variable "name" without extra whitespace from the $_REQUEST array as a string, or "" if it doesn't exist.

echo "Your age is ".$request->get_html_string("age"); // Get the variable "age" as an HTML-safe value from the $_REQUEST array as a string, or "" if it doesn't exist.
?>