Dear all,
I made the following form.
<FORM METHOD="POST" ACTION="prova.p hp">
<b>Combinatio n</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($_SESSI ON['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
I made the following form.
<FORM METHOD="POST" ACTION="prova.p hp">
<b>Combinatio n</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($_SESSI ON['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
Comment