Looking for PHP script-- user enters form information that gets stored on database

I’m looking for a PHP script that can help me with this:

I want to make a webpage in which users submit some text along with their name, and the script takes the information and enters it into a database. From there, I want to make a separate page that takes the information from the database and lists the information chronologically. Can someone direct me to a script that can facilitiate this?


This goes WAY beyond just a script.

Do you have a database program running on your server? If so, what kind?

Next you need to build a database and datatables which will store the information.

Once you figure that out, you need to identify the proper syntax for opening a connection to the database.

At that point you need to build a SQL query which will insert/update the information captured from the form.

Next you’ll need to write a seperate SQL query which pulls the sorted data and build a loop in order to display the formatted data in HTML.

That’s the $0.10 tour, you’re going to have to offer up alot more info before you get any help.

Yep, what information you want scooped up, how you want to save that in the database, etc. is all going to depend on your specific project. As such, it’s near impossible to have any sort of facilitating script. "

So, pretty much you are just going to have to build it all yourself. Shouldn’t be too hard though, actually. Easy enough, really, that anything you did find “to make it easier” will probably actually be making it more difficult.

" Theoretically one could have a script that scanned the webpage with all the input fields and built a table of just blobs based on it, and a page which dumped all the things but… Oog. I wouldn’t trust it.

Maybe my original post sounded more elaborate than what I meant. This is a very simple website that is being used for low traffic and for noncommercial purposes. Although I have experience with databases, I’d rather not use one if I don’t have to. I do have SQL available, but according to my PHP book, I should be able to create a simple text file (database.txt, for example) that PHP writes to, and that it can read from.

Basically all I want is to be able to take from users 1) a comment and 2) a user name, and have PHP create a page that looks basically like this:

-User name

-User name

-User name


Surely there’s something readily available that can do this, right?

Sounds like a simple guestbook. You might be able to find a script at the PHP Resource Index.

PHP also had a built in database, I believe. That way all of your interaction with the DB would be through PHP.

You don’t want to use a text file though. I’ve tried this, and simply the mechanism for handling files isn’t set up to be able to handle multiple threads accessing a single file for random IO. So unless you want to handle locking in your code, you’re better to use a DB. Most likely any guestbook script you find will use the built-in database.