Forum Moderators: coopster
In php 4, when I pass on hidden inputs to the processing script, it works. After moving to php 5, the hidden input values aren't passed. Does php 5 handle hidden inputs differently?
example :
<form name="preview" method="post" action="process.php">
<input type = "hidden" name = "sendername" value = "andrewshim">
</form>
over at process.php, I do this :
$sendername = $_POST["sendername"];
No values are passed... am I doing it wrong?
<?php
error_reporting(E_ALL);
if(isset($_POST['sendername']))
$sendername = $_POST["sendername"];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head><body bgcolor="#FFFFFF" text="#000000">
<?php if(isset($sendername)) echo "<p>$sendername</p>\n";?>
<form name="preview" method="post" action="<?php echo $_SERVER['PHP_SELF'];?>">
<input type = "hidden" name = "sendername" value = "andrewshim" />
<input type = "submit" name="submit" value="Submit" />
</form>
</body>
</html>
echo '<pre>';
print_r($_POST);
echo '</pre>';
die;
tht will just dump all of your post vars to the screen so you can look at them, you might see something strange
I had one recently where I was redirecting the process script by accident, everything was working but the redirect would happen and then everything was blank
very frustrating
Crap. That means something is wrong with my pages, so I took them offline for a while and will re-construct the page, testing line by line, to see what's causing the problem. I know it's right in front of my nose... just can't see it... I hate it when that happens!
Time constraints make it difficult, but I guess it has to be done... Thank god this site doesn't bring in money directly, but is used as a secondary marketing tool.