473,467 Members | 1,300 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

POSTing through frames

Ike
I have what is perhaps a stupid problem. I have a form where users enter
values (call this page1.php), and these then need to be POSTed to a page
(page2.php) (code at bottom of this posting), that calls up a page with two
frames (page3a.php and page3b.php) BUT, I need the values that the user
entered in page1.php to be visible to page3a.php and page3b.php.

When I submit from page1.php (running apache btw) I get "Method Not
Allowed -- The requested method POST is not allowed for the URL /page2.php."

Can anyone please tell me how to get this values posted from page1.php. to
the targets where I need those values in page3a.php and page3b.php? Thanks,
Ike

This is page2.php:
<HTML>
<HEAD>
<TITLE>VIOS Demonstration</TITLE>

</HEAD>
<frameset rows="360,*">
<frame src="page3a.php" name="top" scrolling="no"
noresize FRAMEBORDER="0" BORDER="0" FRAMESPACING="0" marginwidth="1"
marginheight="1">
<frame src="page3b.php" name="bottom" marginwidth="1"
scrolling="no" noresize FRAMEBORDER="0" BORDER="0" FRAMESPACING="0"
marginheight="1">

<noframes>
<body>
<p>
<p>This web page uses frames, but your
browser doesn't support them.</p>
</body>
</noframes>
</frameset>
</HTML>
Mar 3 '07 #1
1 1524
Here's a couple of ways to pass values.

1) using querystring
=============

page1.php :
<form method="post" action="page2.php">
<input type="text" name="t1" value="hello">
<input type="text" name="t2" value="world">
<input type="submit" value="submit">
</form>
frameset :
<?php
$t1='';
$t2='';
if($_POST){
$t1 = $_POST['t1'];
$t2 = $_POST['t2'];
}
?>
<frame src="page3a.php?t1=<?php echo urlencode($t1); ?>">
<frame src="page3b.php?t2=<?php echo urlencode($t2); ?>">
page3a.php :
<?php
if(isset($_GET['t1'])){
echo $_GET['t1'];
}
?>
page3b.php :
<?php
if(isset($_GET['t2'])){
echo $_GET['t2'];
}
?>
2) using SESSION
============

page1.php :
[same code]
frameset :
<?php
if($_POST){
session_start();
$_SESSION['t1'] = $_POST['t1'];
$_SESSION['t2'] = $_POST['t2'];
}
?>
page3a.php :
<?php
session_start();
if(isset($_SESSION['t1'])){
echo $_SESSION['t1'];
}
?>
page3b.php :
<?php
session_start();
if(isset($_SESSION['t2'])){
echo $_SESSION['t2'];
}
?>

Mar 4 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: les | last post by:
Hello, I just wonder what are the implications to use frames to build portal. I've seen some sites that are quite fast with frames but I just wonder if there are hidden "costs". I've tried to...
40
by: JohnnyCJohnny | last post by:
Is it pretty safe to say that almost all web surfers now use browsers that are Frames compatible? What are most people using these days? IE? Thanks
7
by: David Hayes | last post by:
I tried finding an answer on http://www.quirksmode.org/ without success. I am attempting a complicated Frames structure. I have made it work in IE, but not Netscape. I begin with three...
95
by: Neal | last post by:
Of course, every frame site I've ever seen has reduced usability and all. We've been through this before. But as frameset is still a part of HTML, there must be some legitimate use for it, hmm?...
25
by: Steal | last post by:
Hi at all I try to validate this page using the link: http://validator.w3.org/ but it return that this is not a valid HTML 4.01 page please where is it error? Steil <!DOCTYPE HTML PUBLIC...
4
by: Raffi | last post by:
I'm developing an application where the main page has an iframe that contains the form. The "Submit" button is located on the main page (not the iframe). Is it possible to get the form data from...
7
by: dj Bass | last post by:
simple, they don't like things that restrict the server-side controls... and when it comes to frames, you need client side stuff and that stuff's up the asp.net strategy. right or wrong?
6
by: Darin McGrew | last post by:
A few years ago, I was posting the WDG's Web Authoring FAQ to ciwah. The FAQ was crossposted to comp.answers and news.answers, and is archived at ...
56
by: Deepan HTML | last post by:
Hi All, Currently i am working in a framed environment where i have divided the window as 20% and 80% and the 20% is used for navigation purpose and right frame for displaying the orignal content....
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.