Login   Register  
PHP Classes

File: example.advanced.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 7 years ago
Size: 445 bytes


Class file image Download
// 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.