Teen Programmers Unite  
 

 

Return to forum top

PHP Guestbook

Posted by mattlynam2002 [send private reply] at December 23, 2002, 04:21:10 PM

Hey, im a complete beginner to PHP so forgive me if it seems like a stupidly simple question to ask. But... I'm attempting to create a guestbook using PHP and dont no how to start.I dont meen a real complicated one just one to show me the basics of posting and storing messages. So.. do u have any suggestions or links for a beginning ? Thanx

Posted by Kruptos [send private reply] at December 23, 2002, 11:55:41 PM

Well, to start with you need to create a database for storing the info in your guestbook. I reccomend MySQL because it works so well with PHP. Then I would work out some SQL queries for manipulating the data in that database. Then essentially what you need to do is create at the minimum 2 PHP scripts. One that will grab the data from a form and insert it into the databse, and another that will display the data in tables, or rows, or however you want it to be displayed.

If you haven't the foggiest idea of how to go about coding this I suggest you search google for PHP & MySQL tutorials. There are plenty of those out there. There are also plenty of PHP & MySQL guestbook snippets you can use/modify/get ideas from.

Hope that helped.

Posted by mop [send private reply] at December 24, 2002, 01:56:28 AM

no, if you are starting just use flat files, don't bother having to learn database programming at this point.

Posted by mattlynam2002 [send private reply] at December 24, 2002, 04:39:11 PM

Ok thanks ill look for some tutorials, thanx for the help and a merry christmas to all of TPU !

Posted by Kruptos [send private reply] at December 26, 2002, 11:15:45 PM

But why bother learning how to use flat files when databases are so much more useful over all? Unless you're never planning to go beyond simple scripts like guest books with PHP, I personally suggest that you look into database programming.

Posted by gian [send private reply] at December 27, 2002, 08:24:12 PM

I would have to disagree. If you have no experience with PHP and structuring data, then beginning with a simple flat file is probably preferable.

Posted by CDR700 [send private reply] at December 29, 2002, 06:58:11 AM

Learning SQL is a bugger, there are access layers or whatever you call them , includes for php that allow easier access. They too can be confusing, but something that never fails is a library that reads and parses INI files, their format is easier to understand than XML and the libraries are really tiny.

Posted by mattlynam2002 [send private reply] at December 30, 2002, 07:31:26 AM

Isnt there a easier way that enables me to simply add rows to a table, but not a database ?

Posted by regretfuldaydreamer [send private reply] at December 30, 2002, 01:06:48 PM

Isn't that what a database is?

You must be logged in to post messages and see which you have already read.

Log on
Username:
Password:
Save for later automatic logon

Register as a new user
 
Copyright TPU 2002. See the Credits and About TPU for more information.