Location: PHPKode > scripts > Zquery > zquery/process.php
<? session_start(); 
require_once('inc.zquery.class.php');

$zq = new zquery;

// I want to see some debug
$zq->zdebug_onoff(TRUE);

if($_GET && !isset($_POST['postit']))
{
	
	// dumps the $_GET data to screen
	$zq->zok('Data you sent:<pre>'.print_r($_GET,true).'</pre>');
	
}

if((empty($_POST['email']) || empty($_POST['name' ])) && isset($_POST['postit']))
{

	// dumps the $_POST data to screen as error and an error message
	$zq->zerr('Name: ' . $_POST['name' ] . '<br />E-mail: ' . $_POST['email'] . '<br /> Please fill both in: your e-mail address and name.');
	
}
elseif(! empty($_POST['email']) && ! empty($_POST['name' ]) && isset($_POST['postit']))
{
	
	// dumps to screen the $_POST data and a thanks message
	$zq->zok('Name: ' . $_POST['name' ] . '<br />E-mail: ' . $_POST['email'] . '<br />Thanks, you are suscribed!');
	// remove the subscribe button
	$zq->zjq('$("#subx").fadeOut("slow");');
	// show an alert
	$zq->zjq('$( function() { alert("The subscribe button will be removed!"); } );');
	// now we display de data through another file (showdata.php)
	$zq->zload('showdata.php?name='.stripslashes($_POST['name' ]).'&e-mail='.stripslashes($_POST['email' ]).'','zqDisplay');
	
}
?>
Return current item: Zquery