Jump to content

comments


thibo1025
 Share

Recommended Posts

I am trying to create a site as a blog form but I would like to know how to let people leave comments on the pictures I set in. what technique should I use? what scripting language? I would like help thank you

Link to comment
Share on other sites

true when I looked around for the the techniques used by professional nlogging sites they mainly used php pages(pthml to be exact) but the matter is that I do not understand PHP that well I tryed to understand ot but never got to it while I do understand partly javascript.For so, I would need help to understand the kind of protocol to use for it to work

Link to comment
Share on other sites

if you don't know php, why don't you just use some blogging or content management system that already exists? there are many, and you can usually customize using templates, etc...if you want to learn php, I would suggest you begin with some smaller, simpler projects.

Link to comment
Share on other sites

I understand part of it but rater little.As I already use javascript I understand the global idea of scripting language.And using blogging existing on the net dose not interest me as I want to understand how it works alone.But thank you for your advice anyway

Link to comment
Share on other sites

If you are just trying to make it so people can leave comments about an image...There are a few ways to get it done. A not so great idea is to simply write the new "comments" to a file, so that the file contains all the comments for a particular image.A more common way is to store the comments in a database. Maybe the database table just has one field for the image name, one for the comment, another for author, another for date, etc... Your for adding comments, your server-side script can get data submitted from a form and insert it into a database. Then to display comments, your script just needs to query the database for all comments associated with the image name of the image you are displaying.Not sure if that is helpful at all...

Link to comment
Share on other sites

my idea is to do the first technique but I do not know how to sent the information in the html(or php I don't mind) page.I tryed a PHP method using post but I cant make the coment stay.I have no Idea of how to make it create a paragraph contaning the text posted in the sheet.Do you see what I mean?

Link to comment
Share on other sites

If you want the comment to "stay" it will have to be stored somewhere. In order to store it you will need to use some server-side scripting.If you store it in a file, just print the comment to a file. To show it again later, you can use include(), or you can actually read from the file and print it out. If you want to read from the file, you could keep each comment on one line, then read the file a line at a time.You might find a few tutorials about making a guest book using php or asp or whatever language you are wanting to use.I would recommend following through some tutorials or examples of similar projects until you feel comfortable with the basic ideas being used. Then you can just adjust those ideas to match the project you are working on for allowing users to post comments on images...

Link to comment
Share on other sites

thank you I understand a bit more now eaven if I don't see how to use require() to print the comments on a html page.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...