Hello ppl..
Excuse me if such a topic has been posted earlier. Here is my problem. I have 3 pages, one.php, two.php, three.php. I am taking a variable called keyword in one.php using a form. I have called the variable using $_GET['keyword'] in two.php page and wrote some sql queries based on that word.
As soon as I submit the one.php page, I need to send the keyword to a function search( ) in three.php also. But this three.php page is in a different frame where as one.php and two.php are in the same frame. So, Im having trouble passing the variable to this three.php page
I tried using sessions and I was unsuccessful at that. May be thats because I am new to all this PHP
Even if I were able to pass the variable, how could I just make the function search( ) to work as soon as I submit the variable ?
Any help would be deeply appreciated. Thanks in advance
Posting variables between frames
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Posting variables between frames
Sounds like you need to add Javascript to submit the values to the other frames. You may want to review why you are using frames in the first place. Javascript libraries like Prototype/jQuery allow you to do this stuff within a single page.
(#10850)
Re: Posting variables between frames
I already added java script in two.php to re direct the page to three.php
this was the code
"themap" being the name of that frame. It is accessing that function. But the function has some SQL query which makes use of the keyword which I am not able to access.
this was the code
Code: Select all
<script language="javascript" type="text/javascript">
window.top.themap.Search();
</script>