View Full Version : Passing variables through the URL inside frames
10-04-2003, 10:37 PM
I'm trying to pass a variable to my PHP script which is in a frame. I'm using <frame SRC="selectpage.php?page=14" NAME="bottom"> to do it. If I access the page through a normal URL, outside of frames, it gets the value of $page correctly, no problem. But inside of the frame, $page is undefined. How do I get this variable's value?
Please help me, this is driving me crazy.
10-04-2003, 11:19 PM
Using frames or not shouldn't effect anything to do with php.
10-04-2003, 11:26 PM
Your problem is rather weird. What you did was correct. Post a short test case that shows the issue so we can have a detailed look at it.
10-05-2003, 12:59 AM
OK, now all the sudden my initial value of 14 is actually coming through. I'm not sure why it wasn't before. But when I click on a button to move to a different page, then things get broken and $page becomes a null value. Normally this code won't show the user the values of $page and $prevpage, i put them in for debugging purposes.
Here's the code I've got:
<input type=\"image\" src=\"img/firstbutton.jpg\" height=\"48\" width=\"73\" border=\"0\" alt=\"go to first page\"
<input type=\"image\" src=\"img/backbutton.jpg\" height=\"48\" width=\"73\" border=\"0\"
alt=\"go to previous page\"
<img src=\"img/backbutton.jpg\" height=\"48\" width=\"73\" border=\"0\" alt=\"you can't go back one page\">
10-05-2003, 02:45 PM
But I did get the problem fixed. That's the good news.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.