Login   Register  
PHP Classes
elePHPant
Icontem

File: GET_example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Dror Golan  >  HTTP2PHP  >  GET_example.php  >  Download  
File: GET_example.php
Role: Example script
Content type: text/plain
Description: sample to grab GET params into PHP vars
Class: HTTP2PHP
Generate code to set variables from request values
Author: By
Last change:
Date: 2009-08-22 17:41
Size: 1,191 bytes
 

Contents

Class file image Download
<?php

// fetch and set params - GET EXAMPLE

include_once ("HTTP2PHP.php");

echo 
"<strong> EXAMPLE 1 </strong><br>";
echo 
"Before Fetching and Setting ...:<br>";
echo 
"Hello $uname , your email is $email , your password is $password , your address is $address and your phone is $phone<br>";

//example 1 : fetch and set GET REQUEST PARAMETERERS , no debug , no output array [DEFAULT]
$fetchPar1 = new HTTP2PHP();
$fetchPar1->fetch();
eval(
$fetchPar1->showSetCode());
echo 
"After Fetching and Setting ...:<br>";
echo 
"Hello $uname , your email is $email , your password is $password , your address is $address and your phone is $phone<br>";

echo 
'<hr>';
echo 
"<strong> EXAMPLE 2 </strong><br>";
//example 2 : fetch and set GET REQUEST PARAMETERERS , degub is ON
$fetchPar2 = new HTTP2PHP("GET",TRUE);
$fetchPar2->fetch();
eval(
$fetchPar2->showSetCode());
echo 
'<hr>';
echo 
"<strong> EXAMPLE 3 </strong><br>";
//example 3 : fetch and set GET REQUEST PARAMETERERS , degub is OFF , show Associative array
$fetchPar3 = new HTTP2PHP("GET",FALSE);
$fetchPar3->fetch();
eval(
$fetchPar3->showSetCode());
echo 
"array is ".print_r($fetchPar3->showVarArray(),true);

?>