I have to php files testA.php and testB.php
The testA.php contains form that will be submitted to testB.php
on the testB.php will have evaluation to the value of the submitted variables.
if it is not valid, i want it back to testA.php with the warning error.
if it is valid, will print "OK"
currently these are the codes... pls help me examine them, because they don't turn out right.
testA.php
<?
if ( $errCode ) {
print "Error";
}
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY>
<form action="testB.php" method="post">
<input type="text" name="isi1" >
<input type="text" name="isi2" >
<input type="submit" name="s1" value="ok">
</form>
</BODY>
</HTML>
==================================================================
testB.php
<?
if (!$isi1 || !$isi2) {
header ("Location: TestA.php?errCode=1");
exit;
}
else {
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY>
<?
print "OK";
}
?>
</BODY>
</HTML>
Guys, please help me out ASAP.
Any help will be appreciated....
thank u very much