scripter50
IS-IT--Management
I have some basic code that will not work on my localhost, but works just fine on my website?? Is there something in the php.ini that needs to be changed? Just setting a hidden field with js and submitting??
<html>
<head>
<title>Test Page</title>
<script language = "javascript" type = "text/javascript">
function fnValidate() {
var form = document.frmTest;
form.hdnStage.value = "1";
form.submit();
}
</script>
</head>
<body>
<form name="frmTest" method="post" action="testPage.php">
<input type="hidden" name="hdnStage" value="">
<?php
if (empty($hdnStage)) {
?>
Show this initial text....<br><br>
<input type = "button" name="btnSubmit" value="Submit" onclick="fnValidate()">
<?php
}
else {
?>
Show this resulting text....
<?php
}
?>
</form>
</body>
</html>
<html>
<head>
<title>Test Page</title>
<script language = "javascript" type = "text/javascript">
function fnValidate() {
var form = document.frmTest;
form.hdnStage.value = "1";
form.submit();
}
</script>
</head>
<body>
<form name="frmTest" method="post" action="testPage.php">
<input type="hidden" name="hdnStage" value="">
<?php
if (empty($hdnStage)) {
?>
Show this initial text....<br><br>
<input type = "button" name="btnSubmit" value="Submit" onclick="fnValidate()">
<?php
}
else {
?>
Show this resulting text....
<?php
}
?>
</form>
</body>
</html>