You are here: Re: Passing Variables between frames « PHP Programming Language « IT news, forums, messages
Re: Passing Variables between frames

Posted by chimambo on 01/03/08 12:01

On 28 Dec 2007, 14:04, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> Betikci Boris wrote:
> > On Dec 27, 12:51 pm, chima...@googlemail.com wrote:
> >> On 21 Dec, 17:50, Betikci Boris <pard...@gmail.com> 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:

<?php
session_start();
if(!session_is_registered("myusername"))
{
header("location:login.php");
}
?>
<?php require_once('./Connections/db.php'); ?>

<?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"];
}
?>
<html>

<head>
<title>Default</title>
</head>

<frameset rows="62,*,64" framespacing="0" border="0" frameborder="0">
<frame name="top" scrolling="no" noresize target="contents"
src="header.htm">
<frameset cols="154,*">
<frame name="Menu" target="main" src="side.php" scrolling="yes" >
<frame name="main" src="summary.php" scrolling="yes" target="_self"
>
</frameset>
<frame name="bottom" scrolling="no" noresize target="contents"
src="footer.htm">
<noframes>
<body>
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</frameset>

</html>

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.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация