Working server: RedHat Linux 7.2, PHP 4.3.4, Apache 1.3.27
Problem server: RedHat Linux 9, PHP 4.2.2, Apache 2.0.40
The code for a file called proccess.php:
Code: Select all
<html>
<head>
<script language=JavaScript type="text/javascript">
<!--
function updatepage(x) {
formname.currentpage.value = x;
document.formname.submit();
}
-->
</script>
<title>Title</title>
</head>
<body>
<form method="POST" name="formname" action="process.php">
<?php
$currentpage = $_POSTї"currentpage"];
echo "currentpage = $currentpage <p>\n";
echo "<input type='hidden' name='currentpage' value='$currentpage'>\n";
?>
<input type='button' value='add new' name='add' onClick="updatepage(1)"></p>
</form>
</body>
</html>Code: Select all
echo "currentpage = $currentpage <p>\n";currentpage = 1
after clicking the button on the page. On the problem server something different is displayed
currentpage = 1currentpage=1
The correct value is being displayed, but the value contains the variable name itselft and the value again. Any thoughts on what might be causing this? Thanks.