Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of mohamad Reza kavoosi  >  Fill Form  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example use of class
Class: Fill Form
Fill the inputs of a form with submitted values
Author: By
Last change:
Date: 2012-02-07 02:05
Size: 422 bytes
 

Contents

Class file image Download
<?php
require_once 'FillForm.php';

$f file_get_contents("temp.tpl");

$p = new FillForm($f);

//fill textbox username with "mohamad reza kavoosi"
$p->FillTextBox("username""mohamad reza kavoosi");

// select option iran from country comboBox
$p->SelectOption("country""iran");

//fill all controls with posted data
if($_SERVER["REQUEST_METHOD"]=="POST")
    
$p->PostedDataToControls($_POST);

echo 
$f;