PHP1234 Posted January 28, 2008 Share Posted January 28, 2008 dear all i am new somehow to PHP but i have a good info. about programming in general (c/c++ , vb , C# ...etc) my ques. now is about the following i have a page PHP+html with a textbox and submit button , what i need that each time a word in written in the textbox and the user click the submit button ,the word should be added to a table in the same page as the following 1- test1 2- car 3- man and so on i need to know what is the best ways to edit the page and to add such info the page don't used any DB so the data must be updated to the page thanks all Quote Link to comment https://forums.phpfreaks.com/topic/88167-how-to-add-a-data-to-a-php-page/ Share on other sites More sharing options...
priti Posted January 28, 2008 Share Posted January 28, 2008 Hi, For saving data you can use $_SESSION.The value will be live till the session is not expired.And if you want permaenet way to store then use unqiue files.Now it all goes with you how you have to start. Regards Quote Link to comment https://forums.phpfreaks.com/topic/88167-how-to-add-a-data-to-a-php-page/#findComment-451114 Share on other sites More sharing options...
rajdeep_das Posted January 28, 2008 Share Posted January 28, 2008 Hi, You can add the values in $_SESSION or you can save the data in Cookie every time user hits submit. Then fetch it from there. Quote Link to comment https://forums.phpfreaks.com/topic/88167-how-to-add-a-data-to-a-php-page/#findComment-451220 Share on other sites More sharing options...
PHP Monkeh Posted January 28, 2008 Share Posted January 28, 2008 It sounds more to me that he wants the data to be displayed for every user, rather than just the user that submits it. For that you're going to have to use either a database, a file or you can try editing the page then uploading it (not sure if this will work though). I'd suggest using a .txt file or something similar though if a database is not an open, look up fwrite and file_get_contents in the manual. Quote Link to comment https://forums.phpfreaks.com/topic/88167-how-to-add-a-data-to-a-php-page/#findComment-451222 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.