Html-PHP forms connections

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
maayanadmin
Forum Newbie
Posts: 2
Joined: Fri Sep 11, 2009 8:22 am

Html-PHP forms connections

Post 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.
Eric!
DevNet Resident
Posts: 1146
Joined: Sun Jun 14, 2009 3:13 pm

Re: Html-PHP forms connections

Post 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.
SimonMayer
Forum Commoner
Posts: 32
Joined: Wed Sep 09, 2009 6:40 pm

Re: Html-PHP forms connections

Post 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.
maayanadmin
Forum Newbie
Posts: 2
Joined: Fri Sep 11, 2009 8:22 am

Re: Html-PHP forms connections

Post 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..
Post Reply