What am I doing wrong here? Further up in the script I am setting rowid from a form (using get), and then I tried using just the ‘global $rowid;’ to bring it into the function. When that didn’t work I put $rowid as a variable inside the function login_get($rowid); and passed the rowid to it that way.
Now that half works…
For some reason, I can get the [i] echo “<tr><td>Username : $rowid</td><td><input name=’user’></td></tr>n” ;[i] echo “<meta http-equiv=’refresh’ content=’20; url=?rowid=”.$rowid.”9′><a href=’?’>Wait … $rowid</a>” ;
exit;
Any ideas what i’m doing wrong?
[code=php]
function login_get($rowid)
{
if (isset($_POST[‘user’]) && isset($_POST[‘passwd’])) {
global $rowid;
setcookie(“protect_user”, $_POST[‘user’], time()+864000, ‘/’) ;
setcookie(“protect_passwd”, crypt($_POST[‘passwd’], ‘pc’), time()+864000, ‘/’) ;
global $rowid;
echo “<meta http-equiv=’refresh’ content=’20; url=?rowid=”.$rowid.”9′><a href=’?’>Wait … $rowid</a>” ;
exit;
}
require(“header.php”);
echo “<table width=’100%’><tr><td align=’center’><table>n” ;
echo “<form action=’?’ method=’post’>n” ;
echo “<tr><td>Username : $rowid</td><td><input name=’user’></td></tr>n” ;
echo “<tr><td>Password :</td><td><input type=’password’ name=’passwd’></td></tr>rnn” ;
echo “<tr><td> </td><td align=’center’><input type=’submit’ name=’Login’ value=’Login’></td></tr></form></table></td></tr></table>” ;
require(“footer.php”);
die();
}