alapimba Posted July 18, 2007 Share Posted July 18, 2007 Hello what is wrong here? i want to do one action if on the url theres any anchor=... example.. i have a link to index.php and i have another link to index.php?anchor=roger in one link i don't want to do nothing on the second i want to echo roger. What is wrong in if($_GET['anchor'] != null) { ? And by the way... how to use this GET command if it's inside an iframe? It's not getting the url from the top page Thanks in advance Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted July 18, 2007 Share Posted July 18, 2007 Does this work? <?php if($_GET['anchor'] != null) { echo $_GET['anchor']; } ?> Quote Link to comment Share on other sites More sharing options...
alapimba Posted July 18, 2007 Author Share Posted July 18, 2007 nop just found the solution. isset($_GET(['anchor']))... but i don't know yet how to solve the issue with the $_GET inside the iframe Quote Link to comment Share on other sites More sharing options...
rlindauer Posted July 18, 2007 Share Posted July 18, 2007 Pass the $_GET variable to the page in the iframe via the iframe src value: <iframe src="example.com/index.php?anchor=whatever"></iframe> Quote Link to comment Share on other sites More sharing options...
alapimba Posted July 19, 2007 Author Share Posted July 19, 2007 humm.. do you mean on the index.php put the iframe src as a variable? Quote Link to comment Share on other sites More sharing options...
alapimba Posted July 19, 2007 Author Share Posted July 19, 2007 solved, iframe with the link as a variable is working fine. thanks for your help Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.