Page 1 of 1

Html-PHP forms connections

Posted: Fri Sep 11, 2009 8:28 am
by maayanadmin
Hey.

I'm building an aplication that sends details from users with a form on an Html page,
to a PHP page who prints them.

when I refresh the PHP page or sending it new details, it replaces the older ones.

I want the old details to remain on the page and that the new details will be setted in a row before it.
P.S - I want it to heppend until it reaches 10 rounds.

can it be done without involving the database?

tnx.

Re: Html-PHP forms connections

Posted: Fri Sep 11, 2009 8:44 am
by Eric!
You have to repost the old data along with the new data otherwise when you reload the page only the data that is posted will be displayed, the old data will be lost.

Re: Html-PHP forms connections

Posted: Fri Sep 11, 2009 8:46 am
by SimonMayer
Yes it can be done, but a database is usually the best option.

I would personally favour the use of a MySQL database, but you could also look at storing the data in session cookies $_SESSION[] or force the previous rows (as well as the new ones) to be resubmitted to the PHP page by using <input type='hidden'>.
Why do you not want to use a database?

Alternatively you could look at AJAX to append to the existing page contents.

Re: Html-PHP forms connections

Posted: Fri Sep 11, 2009 2:16 pm
by maayanadmin
thank you very much.

i don't want to use database simply because i need this fast prudoct and i just started learning php.
i have a server that support mysql (godaddy) and i know how to open a new database or creating a table,
but this is all i know..