comparing strings - again!
| From: | Ross | Date: | Tue, 20 Jun 2006 14:03:15 +0000 |
| Subject: | comparing strings - again! | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-238400@lists.php.net to get a copy of this message | ||
if (isset($_POST['Submit'])) {
//echo "post equals".$_POST['x']." corect
is".$correct_answers[$page-1];
$compare1 = $_POST['x'];
echo "page is".$page;
$compare2 = $correct_answers[($page-1)];
echo "compare1 is ".$compare1;
echo "<BR>";
echo "compare2 is ".$compare2;
if (strcmp($compare1, $compare2) == 0) {
$incrementedPage = $page + 1;
?>
<script type="text/javascript">
<!--
window.location = "http://www.google.com/"
//-->
</script>
<?
//header("Location: evaluation.php?page=$incrementedPage");
}
else {
$chances++;
echo "you have had".$chances;
}
}
?>