PHP Classes

File: Post_example.php

Recommend this page to a friend!
  Packages of Dror Golan   HTTP2PHP   Post_example.php   Download  
File: Post_example.php
Role: Example script
Content type: text/plain
Description: example to grab POST vars into PHP vars
Class: HTTP2PHP
Generate code to set variables from request values
Author: By
Last change:
Date: 17 years ago
Size: 999 bytes
 

 

Contents

Class file image Download
<?php

// fetch and set params - POST EXAMPLE

include_once ("HTTP2PHP.php");


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 POST REQUEST PARAMETERS , no debug [DEFAULT]
$fetchPar1 = new HTTP2PHP("POST");
$fetchPar1->fetch();
eval($fetchPar1->showSetCode());

echo "After Fetching and Setting ...:<br>";
echo "<br>Hello $uname , your email is $email , your password is $password , your address is $address and your phone is $phone<br>";

echo '<hr>';

//example 2 : fetch and set GET REQUEST PARAMETERS , degub is ON
$fetchPar2 = new HTTP2PHP("POST",TRUE);
$fetchPar2->fetch();

echo '<hr>';

//example 3 : fetch and set GET REQUEST PARAMETERERS , degub is OFF , show Associative array
$fetchPar3 = new HTTP2PHP("POST",FALSE);
$fetchPar3->fetch();
echo "array is ".print_r($fetchPar3->showVarArray(),true);

?>