Damon Amyx (damyx) wrote in php,
Damon Amyx
damyx
php

Comments and voting

Hi there. I think this may be a bigger question than really admits of an answer in this forum, but I'll give it a shot anyway.

I'm working on a website in which I'd like to include the option to vote on pages, or leave comments. Thus far I've figured out that this involves forms and cookies, but I'm having all kinds of trouble. It's been months since I've done any sort of coding, and my PHP skills were never good anyway.

So say we have some text links that point to a javascript function, that updates a hidden form with the value input (say, a vote from 1 to 10) and submits the form. can the form submit itself to the same script? -- could a form on view.php have a form action that points to view.php?

how do I set up cookies that won't expire and thus have values overwritten the next time a given user comes and wants to vote, but that will also not allow multiple votes on the same things from the same user?

lots of questions. I've looked around online and gotten swamped. Maybe someone could just recommend a good book on PHP...

thanks-
Damon
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 12 comments