View Full Version : Passing variables through the URL inside frames
10-04-2003, 11: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-05-2003, 12:19 AM
Using frames or not shouldn't effect anything to do with php.
10-05-2003, 12:26 AM
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, 01: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, 03:45 PM
But I did get the problem fixed. That's the good news.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.