Soldato
- Joined
- 12 Feb 2006
- Posts
- 17,633
- Location
- Surrey
can't see why i am having a problem here, probably will end up writing this thread and as soon as i submit i will see why but any way here goes.
ok so part of this site i am working on (just purely to teach myself php and was originally for coursework before it became so big) where the user can report a bad comment but choosing a radio button explaining why it has been reported and then submitting a form. a cookie is then set so that if they return it will say they have already posted a report for this particular comment, but then provide a link for them to post another.
now after the user submits the report everything happens as expected, securty checks etc, then if all good send and set cookie. the only problem is the checking of the cookie doesn't happen until a page refresh and i can't see why.
the basic order of the script:
can anyone guess why from that quick explanation?
ok so part of this site i am working on (just purely to teach myself php and was originally for coursework before it became so big) where the user can report a bad comment but choosing a radio button explaining why it has been reported and then submitting a form. a cookie is then set so that if they return it will say they have already posted a report for this particular comment, but then provide a link for them to post another.
now after the user submits the report everything happens as expected, securty checks etc, then if all good send and set cookie. the only problem is the checking of the cookie doesn't happen until a page refresh and i can't see why.
the basic order of the script:
- first thing it does is check if it should set cookie,
- then checks if cookie is set, if yes say form already sent,
- then checks if the form should be displayed.
can anyone guess why from that quick explanation?