Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

illustratorDavi

macrumors 6502
Original poster
Jun 7, 2004
290
0
North Yorkshire
Hi

I would like to add a comments/feedback page to my portfolio site like this one

comment example

Where the comments are automatically added to the top of the page.

Has anyone seen any tutorials on how to do this or free services. I'm using Golive CS.

Thanks
David
 
I'm at work so I cant reply fully, but -

You need to look for tutorials on PHP.

I've been reading the tutorials at - W3schools and they are ok, but still leave you wanting to know more.

You need the form part which the guest fills in, then the information is stored in a database, which is loaded back into the page.

I've only just started reading about PHP/MySQL so I cant be a great help, but PHP form tutorials are what you are looking for.


Oh yeah, the other thing is you have to make sure your server supports PHP. For that you'd need to contact your website Hosting service.
 
And if you aren't particularely versed in PHP then you can look on Hotscripts and find a comments script. I've seen them while shuffling through there.

But if you are going to program it, this is what I'd do (with my extremely limited amount of knowledge):

comments.htm has your form.
process.php processes your form
data.txt holds your data

in comments.htm your form tag should have process.php be your action and POST be your method.

then if you name the comments block 'comm', a string variable will hold that info in process.php called $comm.

ahhh i got carried away and i have to go to school now, I'll try and finish this when I get home.
 
the most important thing about this whole thing is your web host provides php/mysql support.
 
scem0 said:
then if you name the comments block 'comm', a string variable will hold that info in process.php called $comm.

Forgive me if I'm wrong, but "comments block" means comments form element, right? If so, then careful, as that's v.bad practice and may not work depending on the server configuration (check out register_globals on php.net) - atleast one of the servers I host with has register_globals turned off.

You're better off using $_POST['comm'] as this explicitly states that the data needs to have come from a HTTP Post (aka form post) - using just $comm could mean that you get vars mixed up further down the page, or someone could pass dodgy data through a querystring or a spoofed cookie or something.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.