Location: PHPKode > scripts > get2post > get2post/example.get2post.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>get 2 post</title>
</head>

<body>
<?php
require_once ('class.get2post.php');

//initiate class
$g2p = new getToPost;

if(isset($_POST)):

	foreach($_POST as $key=>$val)
	{
		
		echo $g2p->decrypt($key) . ' -> '. $g2p->decrypt($val) . chr(10) . "<br />\n";
		
	}

endif;

// parameters:
// 1st: action of the form
// 2nd: text shown as link (you can use an image too (html code)
// 3rd: string with values {&} separated ... as: name{=}John{&}surname{=}Joe{&}age{=}20
// 4rd: set text asked for confirmation (leave it empty for no question)

// write the JavaScript
$g2p->writeJS();

// make 1st link
$g2p->get2post('?', 'Execute asking for confirmation.', 'Name{=}It is a long name as you see...{&}Surname{=}Something shorter{&}Age{=}250 years', $yesOrNo='Do you want to continue?');

echo "<br />\n";

// make 2nd link
$g2p->get2post ('?', 'Execute without asking for confirmation...', 'Land{=}Italy{&}City{=}Alessandria{&}Nr{=}123456789');
?>
</body>
</html>
Return current item: get2post