homepage Welcome to WebmasterWorld Guest from 54.166.84.82
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
HTML form field value and php array
Problem in HTML Form and PHP array
maswee

10+ Year Member



 
Msg#: 3419541 posted 7:31 am on Aug 11, 2007 (gmt 0)

Hello all
I am facing some problem to html form and PHP array.

I am creating a html form which has 5 html list menu and menu value get store in array after hitting submit button. The value stores in PHP array and then print on same page and then after re checking the value
If i want modification then click the edit button and value re store in the same html form.
Here we are not using the database.
If it is possible then plz provide me the code and if there is any other solution to this problem them plz guide me.

 

Habtom

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 3419541 posted 3:18 pm on Aug 11, 2007 (gmt 0)

When you hit the submit button and go back to edit a field, my guess is you are losing the data. Infact I see two solutions for you.

When you submit the form, at this moment as you mentioned, you are storing it in array. Instead you can put it in session variables, so that you can have the values available on every page. Read about SESSION here [php.net]

You can also $_REQUEST them in to hidden text boxes, where you can reuse them again.

Habtom

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved