i have looked around for a way to do index.php?XX=XX for a while now, but i cant find a way thats working. when i use index.php?page=main i want main.php to get opened in my mainframe.
Tore Dalaker😕
You mean a GET? Access then trough the superglobal $_GET.
ex: index.php?var=value
$_GET['var'] == 'value'
um i just want index.php?page=main to open main.php in one of my four frames, and for an exampe also index.php?page=downloads to open downloads.php in the same frame.
maybe...
<? // set page var - for example if (!isset($page)) { $page = "main"; } else { $page = "downloads"; } ?> <frameset rows="*,3*"> <frame name="header" src="header.php"> <frame name="content" src="<?=$page?>.php"> </frameset>
How about
<? If($page!=NULL){ $page=$page+".php"; header("location: $page"); } ?>
That what you want?
(I am not sure about the header command, you should check that up)
Regards, Martyn Pittuck
Originally posted by martyn <? If($page!=NULL){ $page=$page+".php"; header("location: $page"); } ?>[/B]
Originally posted by martyn
[/B]
What are you trying to do? Try...
if($_GET['page']) { header('Location: ' . $_GET['page'] . '.php'); }