For the code below, I would like to append echo $_SERVER['QUERY_STRING'];
to the end of index.php. But when I try to do it, it makes the code return a blank page. So I think I might be doing it wrong.
How can I correctly make this appendage?
Thanks in advance,
John
<?php
function show_loginform($disabled = false)
{
echo '<form name="login-form" id="login-form" method="post" action="./index.php">
...
?>
What about:
echo '<form name="login-form" id="login-form" method="post" action="./index.php?'.$_SERVER['QUERY_STRING'].'">';
hmmmm. Can you spell XSS?
I'd recommend going with this is a more safer option:
$url='./index.php';
$qry=array();
$join='';
foreach ($_GET as $name=>$val) {
$join='?';
$qry[]=urlencode($name) . '=' . urlencode($val);
}
$url.=$join . implode('&',$qry);
print "<....action='$url'>";