Location: PHPKode > scripts > My Ajax > my-ajax/Example.MyAjax.php
<?php

if (!empty($_POST['Text'])) {
	sleep(10);
	print $_POST['Text'];
	exit;
}


if (!empty($_GET['Text'])) {
	sleep(10);
	print $_GET['Text'];
	exit;
}


include('class.MyAjax.php');

?>

<html dir="rtl">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<title>ÕÝÍÉ ÌÏíÏÉ 1</title>
<script language='javascript'>
var PageName = 'Example.MyAjax.php';

function NotEmpty1() {
	
	if (document.f.T1.value == ''){
		alert('Plz Fill This Field')
		document.f.T1.focus
		return false
	} else {
		return true
	}
}

function NotEmpty2() {
	
	if (document.f2.T1.value == ''){
		alert('Plz Fill This Field')
		document.f2.T1.focus
		return false
	} else {
		return true
	}

}
</script>
<?
$MyAjax = new MyAjax;

$MyAjax->PrintGetFunction('MyGetFunction','GETZONE');
$MyAjax->PrintPostFunction('MyPostFunction','POSTZONE');
?>
</head>

<body>

<table border="1" width="684" height="96">
	<tr>
		<td height="42" width="50%">
		
		<div id="GETZONE">
		<form name="f">
		<input type="text" name="T1">
		<input type="button" value="ÅÑÓÇá" onclick="javascript:if (NotEmpty1()) { MyGetFunction(PageName+'?Text='+document.f.T1.value,true) }">
		</form>
		</div>
		
		</td>
	</tr>
	<tr>
		<td height="42" width="50%">

		<div id="POSTZONE">
		<form name="f2">
		<input type="text" name="T1">
		<input type="button" value="ÅÑÓÇá" onclick="javascript:if (NotEmpty2()) { MyPostFunction(PageName,'Text='+document.f2.T1.value,true) }">
		</form>
		</div>
		
		</td>
	</tr>
</table>

</body>

</html>
Return current item: My Ajax