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?
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:
“Comment”
-User name
“Comment”
-User name
“Comment”
-User name
…etc
Surely there’s something readily available that can do this, right?
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.