Ok, guestbook??

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
josh22x
Forum Commoner
Posts: 38
Joined: Tue Feb 26, 2008 11:17 am

Ok, guestbook??

Post by josh22x »

I am very new to PHP, and trying to start learning by creating a guestbook for my website. Could anyone offer me any help or advise?

I cannot seem to find any good tutorials on creating a guestbook - I know it is not that hard?

I don't want to download a free one, because I will not learn anything that way....

Thanks
Josh
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Ok, guestbook??

Post by Christopher »

Can you describe how you want it to work?
(#10850)
josh22x
Forum Commoner
Posts: 38
Joined: Tue Feb 26, 2008 11:17 am

Re: Ok, guestbook??

Post by josh22x »

I just want a guest book where people can post comments like: Hey, I like the site and then where this post will be displayed on the same page. This way my site can get some feedback from users.... I don't know if this would require a database, but I have MySQL installed if I need it.


Eventually I want to expand this into a more advanced comments board with various subjects and an RSS feed, etc... but right now I just want to start learning PHP with the simple guest book described above.

Thanks
Josh
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: Ok, guestbook??

Post by JAB Creations »

I like Matt Wright's old school CGI guest book and still use it. It detects the line <!--begin--> on the target file and writes the guest book entry after it.

I'm not sure if PHP can find a line and write after it or if you'd be forced to use some dedicated file to include where PHP merely writes to the first line.

But you need to think of the technical specifics. You can post endlessly for a week but if you can't directly correlate what you want the code to do you won't get any useful replies.

For example if I wanted a layout in CSS I'd have to specify I want tables or div. If I wanted div I'd have to say content should be 80% and the sidebar 20%. Then if I was trying it out and tried to add padding the sidebar would fall below the content...I'd have to ask why and the answer I'd need would be to add margins to the child element instead of padding to the parent.

Every time I ask a question I try to correlate it to code as much as I can and I still have difficulty getting a desired answer off the bat though the discussions go a bit quicker then how I used to post.
josh22x
Forum Commoner
Posts: 38
Joined: Tue Feb 26, 2008 11:17 am

Re: Ok, guestbook??

Post by josh22x »

Ok, well, it does not really matter what the guestbook look like that much. I just need a simple example in order to help me learn to code in PHP. I have used all the forums like W3school's and it does not go any farther than explaining the basics, after that I get kinda lost.

I guess, what I really need is a small PHP project to code, just to get me started learning the language, it seems like a simple guest book or even a email contact form would be a great way to start learning.

Any help will be greatly appreciated....
Thanks
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: Ok, guestbook??

Post by JAB Creations »

There is a very cool form generator you can find here...
http://www.tele-pro.co.uk/scripts/contact_form/
josh22x
Forum Commoner
Posts: 38
Joined: Tue Feb 26, 2008 11:17 am

Re: Ok, guestbook??

Post by josh22x »

Is there not a good online tutorial that will teach me how to do it, instead of doing it for me?

~ ~~
Thanks
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: Ok, guestbook??

Post by JAB Creations »

Let me be frank: you're not going to find good tutorials. Good is subjective to each person. I am by nature a designer and therefor I personally think most tutorials suck as they fail to be minimal, useful, properly presented, without any way to confirm whether the behavior is correct, or how to tell if it is or not. Again my mindset is that of a designer so I lack the natural ability to look at a hundred lines of PHP and say offhand, "Oh you need to change X, Y, and Z." That is why I suggested tinkering with the form generator, you'll be able to have the site generate a form that you prefer so that when you look for your preferences you'll better understand the code.
josh22x
Forum Commoner
Posts: 38
Joined: Tue Feb 26, 2008 11:17 am

Re: Ok, guestbook??

Post by josh22x »

Ok, thanks for your help, I will look at it and see if I can figure it out....

You might hear from me again though..
Post Reply