| 
<?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;
 |