PHP Classes

File: example.php

Recommend this page to a friend!
  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: 9 years ago
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;

For more information send a message to info at phpclasses dot org.