I have two pages in my test environment. I have successfully tested both of them and they look and run well seperately. But when I try to link the two by passing a parameter, the second (receiving page) doesn't work.
Here's what I have.
The second page looks kinda like this:
<?php
/
$pname='Bob';
/
$pname=$GET['mname'];
if ($POST['tuname'] != $pname)
{
?>
<form name="form" method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<p><font size="-1"><b>This area requires a password to have access</b></font></p>
<p><label for="tuname">User Name:</label>
<br /><input type="text" title="Enter your Username" name="tuname" value="<?php echo $pname ?>" /></p>
<p><label for="txtpassword">Password:</label>
<br /><input type="password" title="Enter your password" name="txtPassword" /></p>
<p><input type="submit" name="Submit" value="Login" /></p>
</form>
<?php
}
else {
... more code here ....
?>
When I run this page as a stand alone page {uncomment out $pname='Bob'; and comment out $pname=$_GET['mname']; }, the page will work fine.
However, when I try to pass the paramater mname by using this code:
<a href='password.php?mname=<?php echo $Test2->Value("uname") ?>'>
from the other page it will not work. It gets passed into password.php as follows:
h ttp://localhost/testsite/password.php?mname=Bob
To me, it all looks like it is supposed. Is there something I am missing?
Let me know if you need more information.
Thanks as always.