Passing Variables between frames

Passing Variables between frames

am 21.12.2007 12:34:20 von chimambo

Hi All,

I am trying to pass variables between two frames in PHP. I want to get
a variable from F1 to F2 and the variable that is now in F2 should
pass back the variable to F1 and call another page.

Anyone to help? Thanks

X

Re: Passing Variables between frames

am 21.12.2007 12:40:05 von Captain Paralytic

On 21 Dec, 11:34, chima...@googlemail.com wrote:
> Hi All,
>
> I am trying to pass variables between two frames in PHP. I want to get
> a variable from F1 to F2 and the variable that is now in F2 should
> pass back the variable to F1 and call another page.
>
> Anyone to help? Thanks
>
> X

php does not have frames

Re: Passing Variables between frames

am 21.12.2007 12:58:28 von colin.mckinnon

On 21 Dec, 11:34, chima...@googlemail.com wrote:
> Hi All,
>
> I am trying to pass variables between two frames in PHP. I want to get
> a variable from F1 to F2 and the variable that is now in F2 should
> pass back the variable to F1 and call another page.
>
> Anyone to help? Thanks
>
> X

You can send stuff at the time you create the frame by setting GET
parameters. If you want to send data into an existing frame you'll
need to call javascript in the master window.

C.

Re: Passing Variables between frames

am 21.12.2007 16:33:19 von puzz

chimambo@googlemail.com wrote:
> Hi All,
>
> I am trying to pass variables between two frames in PHP. I want to get
> a variable from F1 to F2 and the variable that is now in F2 should
> pass back the variable to F1 and call another page.
>
> Anyone to help? Thanks

PHP don't know about frames, it treat them as two different request.

You should use session variables...

--
www.panoye.com :: virtual tour

Re: Passing Variables between frames

am 21.12.2007 18:50:23 von Betikci Boris

On Dec 21, 1:34=A0pm, chima...@googlemail.com wrote:
> Hi All,
>
> I am trying to pass variables between two frames in PHP. I want to get
> a variable from F1 to F2 and the variable that is now in F2 should
> pass back the variable to F1 and call another page.
>
> Anyone to help? Thanks
>
> X

Hi, write the values into a text or dat file and second page read them
in that file or use sql database indeed. Ok?

Re: Passing Variables between frames

am 27.12.2007 11:51:39 von chimambo

On 21 Dec, 17:50, Betikci Boris wrote:
> On Dec 21, 1:34=A0pm, chima...@googlemail.com wrote:
>
> > Hi All,
>
> > I am trying to passvariablesbetweentwoframesin PHP. I want to get
> > a variable from F1 to F2 and the variable that is now in F2 should
> > pass back the variable to F1 and call another page.
>
> > Anyone to help? Thanks
>
> > X
>
> Hi, write the values into a text or dat file and second page read them
> in that file or use sql database indeed. Ok?

Hi, how do I write the variables to a txt/dat file? And please note
that these are variables.

Re: Passing Variables between frames

am 27.12.2007 12:04:38 von My Pet Programmer

chimambo@googlemail.com said:
> On 21 Dec, 17:50, Betikci Boris wrote:
>> On Dec 21, 1:34 pm, chima...@googlemail.com wrote:
>>
>>> Hi All,
>>> I am trying to passvariablesbetweentwoframesin PHP. I want to get
>>> a variable from F1 to F2 and the variable that is now in F2 should
>>> pass back the variable to F1 and call another page.
>>> Anyone to help? Thanks
>>> X
>> Hi, write the values into a text or dat file and second page read them
>> in that file or use sql database indeed. Ok?
>
> Hi, how do I write the variables to a txt/dat file? And please note
> that these are variables.
What does that mean? You don't want the values, just the variable names?

~A!

--
Anthony Levensalor
anthony@mypetprogrammer.com

Re: Passing Variables between frames

am 28.12.2007 14:00:21 von Betikci Boris

On Dec 27, 12:51 pm, chima...@googlemail.com wrote:
> On 21 Dec, 17:50, Betikci Boris wrote:
>
> > On Dec 21, 1:34 pm, chima...@googlemail.com wrote:
>
> > > Hi All,
>
> > > I am trying to passvariablesbetweentwoframesin PHP. I want to get
> > > a variable from F1 to F2 and the variable that is now in F2 should
> > > pass back the variable to F1 and call another page.
>
> > > Anyone to help? Thanks
>
> > > X
>
> > Hi, write the values into a text or dat file and second page read them
> > in that file or use sql database indeed. Ok?
>
> Hi, how do I write the variables to a txt/dat file? And please note
> that these are variables.

i meant values of the variables of course!..

Passing values with hidden filed in a form can be easily read.

You should pass the values with plain file or database will be much
more safe.

You can also do this with session variables..

Re: Passing Variables between frames

am 28.12.2007 15:04:14 von Jerry Stuckle

Betikci Boris wrote:
> On Dec 27, 12:51 pm, chima...@googlemail.com wrote:
>> On 21 Dec, 17:50, Betikci Boris wrote:
>>
>>> On Dec 21, 1:34 pm, chima...@googlemail.com wrote:
>>>> Hi All,
>>>> I am trying to passvariablesbetweentwoframesin PHP. I want to get
>>>> a variable from F1 to F2 and the variable that is now in F2 should
>>>> pass back the variable to F1 and call another page.
>>>> Anyone to help? Thanks
>>>> X
>>> Hi, write the values into a text or dat file and second page read them
>>> in that file or use sql database indeed. Ok?
>> Hi, how do I write the variables to a txt/dat file? And please note
>> that these are variables.
>
> i meant values of the variables of course!..
>
> Passing values with hidden filed in a form can be easily read.
>
> You should pass the values with plain file or database will be much
> more safe.
>
> You can also do this with session variables..
>

Writing the values to a file is just extra overhead and can cause lots
of problems - like not cleaning up old files. Similar problems can
occur with a database. Then you must pass a file name in a cookie,
session or hidden variable. I would NEVER recommend such actions -
that's what sessions are for.

If the information is private, use sessions - that's what they're there
for. But if it's something which has been entered on a previous form,
hidden fields should not be a problem.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: Passing Variables between frames

am 03.01.2008 13:01:53 von chimambo

On 28 Dec 2007, 14:04, Jerry Stuckle wrote:
> Betikci Boris wrote:
> > On Dec 27, 12:51 pm, chima...@googlemail.com wrote:
> >> On 21 Dec, 17:50, Betikci Boris wrote:
>
> >>> On Dec 21, 1:34 pm, chima...@googlemail.com wrote:
> >>>> Hi All,
> >>>> I am trying to passvariablesbetweentwoframesinPHP. I want to get
> >>>> a variable from F1 to F2 and the variable that is now in F2 should
> >>>> pass back the variable to F1 and call another page.
> >>>> Anyone to help? Thanks
> >>>> X
> >>> Hi, write the values into a text or dat file and second page read them=

> >>> in that file or use sql database indeed. Ok?
> >> Hi, how do I write thevariablesto a txt/dat file? And please note
> >> that these arevariables.
>
> > i meant values of thevariablesof course!..
>
> >Passingvalues with hidden filed in a form can be easily read.
>
> > You should pass =A0the values with plain file or database will be much
> > more safe.
>
> > You can also do this with sessionvariables..
>
> Writing the values to a file is just extra overhead and can cause lots
> of problems - like not cleaning up old files. =A0Similar problems can
> occur with a database. =A0Then you must pass a file name in a cookie,
> session or hidden variable. =A0I would NEVER recommend such actions -
> that's what sessions are for.
>
> If the information is private, use sessions - that's what they're there
> for. =A0But if it's something which has been entered on a previous form,
> hidden fields should not be a problem.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================- Hide quoted text -=

>
> - Show quoted text -

I might be missing it somewhere. Here is my code and the explanation
below:

session_start();
if(!session_is_registered("myusername"))
{
header("location:login.php");
}
?>


$dtoday =3D date('d-m-Y');

/* check if data is coming through a $_POST or a $_GET */
if ($_GET)
{
$id_no =3D $_GET["idno"];
}
else
{
$id_no =3D $_POST["idno"];
}
?>



Default


>
src=3D"header.htm">


"
>

src=3D"footer.htm">
<br /> <body><br /> <p>This page uses frames, but your browser doesn't support them.</p><br /> </body><br />




NOW: I want to pass a variable coming from another form through $_POST
to both Summary.php and Side.php. Both forms are in the same frame
above.

Re: Passing Variables between frames

am 03.01.2008 14:08:52 von Jerry Stuckle

chimambo@googlemail.com wrote:
> On 28 Dec 2007, 14:04, Jerry Stuckle wrote:
>> Betikci Boris wrote:
>>> On Dec 27, 12:51 pm, chima...@googlemail.com wrote:
>>>> On 21 Dec, 17:50, Betikci Boris wrote:
>>>>> On Dec 21, 1:34 pm, chima...@googlemail.com wrote:
>>>>>> Hi All,
>>>>>> I am trying to passvariablesbetweentwoframesinPHP. I want to get
>>>>>> a variable from F1 to F2 and the variable that is now in F2 should
>>>>>> pass back the variable to F1 and call another page.
>>>>>> Anyone to help? Thanks
>>>>>> X
>>>>> Hi, write the values into a text or dat file and second page read them
>>>>> in that file or use sql database indeed. Ok?
>>>> Hi, how do I write thevariablesto a txt/dat file? And please note
>>>> that these arevariables.
>>> i meant values of thevariablesof course!..
>>> Passingvalues with hidden filed in a form can be easily read.
>>> You should pass the values with plain file or database will be much
>>> more safe.
>>> You can also do this with sessionvariables..
>> Writing the values to a file is just extra overhead and can cause lots
>> of problems - like not cleaning up old files. Similar problems can
>> occur with a database. Then you must pass a file name in a cookie,
>> session or hidden variable. I would NEVER recommend such actions -
>> that's what sessions are for.
>>
>> If the information is private, use sessions - that's what they're there
>> for. But if it's something which has been entered on a previous form,
>> hidden fields should not be a problem.
>>
>> --
>> ==================
>> Remove the "x" from my email address
>> Jerry Stuckle
>> JDS Computer Training Corp.
>> jstuck...@attglobal.net
>> ==================- Hide quoted text -
>>
>> - Show quoted text -
>
> I might be missing it somewhere. Here is my code and the explanation
> below:
>
> > session_start();
> if(!session_is_registered("myusername"))
> {
> header("location:login.php");
> }
> ?>
>
>
> > $dtoday = date('d-m-Y');
>
> /* check if data is coming through a $_POST or a $_GET */
> if ($_GET)
> {
> $id_no = $_GET["idno"];
> }
> else
> {
> $id_no = $_POST["idno"];
> }
> ?>
>
>
>
> Default
>
>
>
> > src="header.htm">
>
>
> >
> > src="footer.htm">
> <br /> > <body><br /> > <p>This page uses frames, but your browser doesn't support them.</p><br /> > </body><br /> >
>
>
>
>
> NOW: I want to pass a variable coming from another form through $_POST
> to both Summary.php and Side.php. Both forms are in the same frame
> above.
>

Pass it as a $_GET parameter, or store it in the session and close the
session. Either works.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================