Login Retreive lost passwordRegister
Search

Manual  /  Functions  /  Buttons  /  ImageButton

ImageButton
ImageButton (
string $image
string $name = null,
string $extra = null 
)

Arguments:

Name Description
$image The image URL which should be the button
$name Name of the button. A name is generated if none is given.
$extra This can be extra information which will be included in the buttons html tag. You can add for example some CSS or javascript.

Description:

Create a image button.

Example

<?php 

// include the class 
include('FH3/class.FormHandler.php'); 

// create a new FormHandler object 
$form = new FormHandler(); 

// textfield 
$form -> textField("Name""name"FH_STRING); 

// image button! 
$form -> imageButton("images/button.gif"); 

// set the oncorrect function 
$form -> onCorrect("doRun"); 

// flush the form 
$form -> flush(); 

// the commit after form function 
function doRun$data 

    return 
"Hello ".$data['name']; 


?>

Preview image

preview image

Latest change: 05 March 10 / 08:40

Comments

powered by PHP-GLOBE   © 2004 - 2024 FormHandler. All rights reserved.   -   Open source license