deeep Posted May 4, 2006 Share Posted May 4, 2006 Hi!!I have to create a form with 2 textfields name and ageand i hv a button addso i need to add my entries to an array each time im pressing add and below the whole entries should be displayed and the new entry should be added at the bottom of the table entriesi dont know how to do thisis it possible to do this without session ???[code]<?php$panier = array ( "article" => $_POST['article'],"quantite" => $_POST['quantite']);echo $panier["article"];echo $panier["quantite"];?>[/code]thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/9058-a-help-for-arrays-please-do-read/ Share on other sites More sharing options...
jeremywesselman Posted May 15, 2006 Share Posted May 15, 2006 Every time that you try to update the information in the array by submitting the form, you are going to clear the previous data. That is unless you do use a session variable to hold the information.If you expect the data to stay there for longer than one visit, you'll need to store it in a database or text file.[!--coloro:#990000--][span style=\"color:#990000\"][!--/coloro--]Jeremy[!--colorc--][/span][!--/colorc--] Quote Link to comment https://forums.phpfreaks.com/topic/9058-a-help-for-arrays-please-do-read/#findComment-35905 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.