Rookie programming question

Discussion in 'PHP' started by JonMo, Jun 9, 2007.

  1. #1
    I am using post to have users submit data to the same page. I can submit data on my own to the page, but if i submit new data or refresh the page the data is gone. Is there any way i can have people submit data and then it stays there but more people can submit and it will be on the same page.

    I know the answer is probably really simple, but this is the first thing i have tried programming myself.
     
    JonMo, Jun 9, 2007 IP
  2. nts

    nts Active Member

    Messages:
    220
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #2
    nts, Jun 9, 2007 IP
  3. ansi

    ansi Well-Known Member

    Messages:
    1,483
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    100
    #3
    You pretty much have two options on this. PHP includes interfaces for at least 20 different databases, including embedded databases such as dbm and Berkeley DB, popular commercial SQL databases including Oracle, IBM DB2, MS SQL and Sybase as well as several sophisticated open source SQL databases including PostgreSQL and MySQL either of which would be the preferred method of doing this. Or, if you're not ready to delve into the world of databases... you could store and read data from a flat file (a text file) on the server. Just giving you an alternative to the database route. if you're interested in the flat file method, www.php.net/fopen www.php.net/fread www.php.net/fwrite

    Though personally, I prefer a database myself... but as a beginner I know it can seem overwhelming. good luck and I hope this helps.
     
    ansi, Jun 9, 2007 IP