Thanks in advance for whoever can help with this question. I have build a messageboard-database using html forms, PHP, and my SQL. The website allows people to post topics and then post messages for each topic. They can then vote up or down on each message.
Right now, I do all that through a single PHP page and I use POST. When I used GET, every time I used the 'back' and 'forward' buttons, it would ask if I wanted to resend the form (very annoying). I want to protect the data, so I switched to POST, but if someone hits refresh after voting, it votes a second time. How can I fix that? Shouldn't the 'POST-ed info' be refreshed, too?
I am also thinking of making the initial presentation of the topic page (that comes up after they click on the topic name from a search) be presented through GET, using a separate PHP page for it. This way the url for the topic page can be linked to (since the actual topic is in the URL, as opposed to the POST page, where the topic is not in the URL). Though, even if I do this, after someone clicks to vote, the resulting page is identical except that the URL won't have the topic in it (since it is through POST now), and people may not realize they could link to it at all. Is there a way that after voting through the POST option, the page gets redirected to the GET version?
Finally, my main question is about SEO. I want the topic pages to be searchable on google. So I am thinking of having PHP dynamically generate static HTML pages. Is this the only way to do it? Should I have them made on the fly? Or just all generated once a day? I figure that when people vote up or down on a message within an HTML page, this would trigger the loading of the respective PHP page through POST. But then it begs the question.. if I want to post a link to a particular topic page (or if i set it up so people can link to one off facebook, for example), should I have it link to the static html page or to the url that creates it dynamically by using GET with PHP? Or should I use the HTML page but have it redirect to the GET page url? Or is there a way to just have GET page urls recognizable by google and have google provide links directly to them? I am thinking no, because they are dynamically generated each time, as opposed to static HTML. Does it matter if I put links up out there to the PHP page, but google directs people to the stat HTML version? I feel like the best thing for SEO would be to keep everything consistent so all the 'hits' are added up together.
Sorry for so many questions, but I think these are timely issues that affect most database sites that want their pages to be searchable in google.