Page 1 of 1
Ok, guestbook??
Posted: Sun Mar 09, 2008 8:25 pm
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
Re: Ok, guestbook??
Posted: Sun Mar 09, 2008 10:05 pm
by Christopher
Can you describe how you want it to work?
Re: Ok, guestbook??
Posted: Mon Mar 10, 2008 1:28 pm
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
Re: Ok, guestbook??
Posted: Mon Mar 10, 2008 1:43 pm
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.
Re: Ok, guestbook??
Posted: Mon Mar 10, 2008 10:15 pm
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
Re: Ok, guestbook??
Posted: Mon Mar 10, 2008 10:21 pm
by JAB Creations
There is a very cool form generator you can find here...
http://www.tele-pro.co.uk/scripts/contact_form/
Re: Ok, guestbook??
Posted: Tue Mar 11, 2008 10:03 am
by josh22x
Is there not a good online tutorial that will teach me how to do it, instead of doing it for me?
~ ~~
Thanks
Re: Ok, guestbook??
Posted: Tue Mar 11, 2008 10:18 am
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.
Re: Ok, guestbook??
Posted: Tue Mar 11, 2008 2:41 pm
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..