Forum Moderators: coopster
The security page code on Page 1 is as follows:
________________________________________
<form action='<?PHP echo $documentLocation;?>' METHOD="post" onSubmit="return checkData()">
<TABLE WIDTH="100%" HEIGHT="100%" CELLPADDING="0" CELLSPACING="0"><TR><TD ALIGN="center" VALIGN="middle">
<TABLE <?PHP echo $theTable;?> CELLPADDING="0" CELLSPACING="0" BACKGROUND="<?PHP echo $cfgHtmlDir;?>images/<?PHP echo $bgImage;?>"><TR><TD ALIGN="center" VALIGN="middle">
<TABLE CELLPADDING="4" WIDTH="100%" HEIGHT="100%" BACKGROUND="">
<TR><TD ALIGN="center" COLSPAN="2"><h1><?PHP echo $strLoginInterface;?></h1></TD></TR>
<TR><TD ALIGN="center" COLSPAN="2">
<B><I><NOBR><?PHP
// check for error messages
if ($message) {
echo $message;
}?></NOBR></I></B>
</TD></TR>
<tr><TD VALIGN="bottom"><A HREF="<?PHP echo $cfgUrl . getenv("HTTP_HOST") . $cfgIndexpage;?>" TABINDEX="2">
<IMG SRC="<?PHP echo $cfgHtmlDir;?>images/cancel.gif" ALIGN="left" WIDTH="22" HEIGHT="23" ALT="<?PHP echo $strCancel;?>" BORDER=0 hspace=10 vspace=4></A>
</TD>
<td ALIGN="right" VALIGN="bottom">
<table cellpadding=4 cellspacing=1 BACKGROUND="">
<tr><td><B><FONT FACE="Arial,Helvetica,sans-serif" SIZE="-1"><?PHP echo $strLogin;?>: </FONT></B></td>
<td> <INPUT TYPE="text" NAME="entered_login" STYLE="font-size: 9pt;" TABINDEX="1"></td></tr>
<tr><td><B><FONT FACE="Arial,Helvetica,sans-serif" SIZE="-1"><?PHP echo $strPassword;?>: </FONT></B></td>
<td> <INPUT TYPE="password" NAME="entered_password" STYLE="font-size: 9pt;" TABINDEX="1"></td></tr>
</table>
<INPUT TYPE=image src="<?PHP echo $cfgHtmlDir;?>images/enter.gif" WIDTH="26" HEIGHT="23" border=0 hspace=7 vspace=4 alt="<?PHP echo $strEnter;?> >>>" TABINDEX="1">
</td></tr></table>
</TD></TR></TABLE>
</TD></TR></TABLE>
</form>
__________________________________________
The page it's being sent to needs the var in there to display the correct data.
The code on the next page (page 2) is as follows:
______________________
<?PHP
$requiredUserLevel = array(1);
$cfgProgDir = 'SecurityCheck/';
include($cfgProgDir . "secure.php");
?>
________________________
How do I get that darned?var=something to post on Page 2s Address Bar?
Thanks in advance!
I'm getting close...
The first try/answer gave me a?var= in the address bar but didn't carry over what was sent before... (i.e.?var=SalesCrosstab.Invoice)
is there a way to edit
?var=<?PHP echo $yourVar;?>
so that I grab what's after?var= currently in the addressbar? i.e. GET?
<form action='<?PHP echo $documentLocation;?>?var=<?PHP echo $_GET['yourAddressBarVar'];?>' METHOD="post" onSubmit="return checkData()">
Personallay I would do this:
if(ISSET($_GET['youraddressbarVar'])){$Var = addslashes($_GET['youraddressbarVar']);}elseif(ISSET($_POST['YourFormVar'])){$Var = addslashes($_POST['YourFormVar']);}else{$Var = "DefaultValue";}
....
...<Form XXXXXXX>
<INPUT Type="hidden" Name="var" Value="<?PHP echo $Var;?>">
Hope this is helpfull