Reply to Re: Sessions

Your name:

Reply:


Posted by Nico on 12/10/06 12:17

Thanks. I tried your proposal but the result is the same.
So, the new inserted text overwrites the old one.
Other suggestions? Many thanks.
Cheers,
Nico

In article <1165752223.583674.156030@l12g2000cwl.googlegroups.com>,
"theCancerus" <thecancerus@gmail.com> wrote:

> simple do this
> <?php
> session_start();
> $_SESSION['combinations'][] = ($_REQUEST["el1"].$_REQUEST["el2"]);
> print_r($_SESSION['combinations']);
> ?>
> <FORM METHOD="POST" ACTION="aktry.php">
> <b>Combination</b><br><br>
> Element 1: <INPUT NAME="el1" TYPE="TEXT">
> <BR>
> Element 2: <INPUT NAME="el2" TYPE="TEXT">
> <br>
> <INPUT TYPE="SUBMIT" VALUE"Submit">
> </FORM>
> <br>
> Combination<br><br>
>
>
> it's just that no headers should be send before session start.........
>
>
> Nico wrote:
> > Dear all,
> >
> > I made the following form.
> >
> > <FORM METHOD="POST" ACTION="prova.php">
> > <b>Combination</b><br><br>
> > Element 1: <INPUT NAME="el1" TYPE="TEXT">
> > <BR>
> > Element 2: <INPUT NAME="el2" TYPE="TEXT">
> > <br>
> > <INPUT TYPE="SUBMIT" VALUE"Submit">
> > </FORM>
> > <br>
> > Combination<br><br>
> >
> > <?php
> > session_start();
> > $_SESSION['combinations'][] = ($_REQUEST["el1"].$_REQUEST["el2"]);
> > print_r($_SESSION['combinations']);
> > ?>
> >
> > If I fill the two text fields, reload the page and then fill again the
> > two text fields, the new text overwrites the old one.
> > I'd like that the array can include both the old and the new text.
> > I tried to use the sessions, but it doesn't work.
> > Can you help me in solving this problem please?
> > Many thanks.
> >
> > Cheers,
> > Nico

[Back to original 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

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