Click to See Complete Forum and Search --> : PHP message script


djvern
02-19-2006, 02:37 PM
For a news article website I require a debate function at the bottom of every article page. This needs to have a 'Screen Name' field, an 'Age' field, a 'Profession' field and a 150-word limit 'Message' field. When a user fills in these form elements and clicks on a submit button, I want all the entered information to be posted after the article on that page. (I assume this will also require a page refresh function). Is this possible with a PHP script? My knowledge of PHP is very limited so any help will be greatly received!

NogDog
02-19-2006, 03:06 PM
Yes, it's very possible with PHP, preferably along with a database (such as MySQL). It's not trivial - nor is it rocket science - but I suspect you can find many open-source scripts out there that you could use as-is or with a bit of tweaking. You might want to browse hotscripts.com, sourceforge.net, etc. for one that has the features you need.

djvern
02-19-2006, 03:09 PM
hm, I was hoping I could achieve it without a database - I don't need to store any usernames or other data. Just need a simple way of writing the entered information to the page..

NogDog
02-19-2006, 03:20 PM
I did say "preferably" with regards to using a database. You could just append the data to a text file, then include that file at the point where you want it displayed on your page. If I were designing it, though, I'd probably use a database due to the increased flexibility and functionality it would give me. (If I want to change what gets displayed in what order, I can just change one line of SQL code and not have to worry about changing the text file.)

djvern
02-19-2006, 03:28 PM
I see what you mean, but the text file option sounds ideal for the moment as the client wants something simple to begin with as this is for a new website. Any ideas where I could track down some script to make this work?

NogDog
02-19-2006, 03:43 PM
Found this with about 30 seconds of searching/browsing at hotscripts.com:
http://www.hotscripts.com/Detailed/56021.html . I can't vouch for it, but it might be worth a look, and I just scratched the surface on that site. (I searched for "comment" under the PHP category.)

djvern
02-19-2006, 05:22 PM
Thanks for that! I'd already looked on hotscripts but not under that category. Think I'm on the right track with this now - many thanks for your help.