TheT Posted November 26, 2011 Share Posted November 26, 2011 I made a website for school where everyone can upload their summaries, download them and rate them (thumbs up, thumbs down). You upload a summary with some data: a specific class, subject, name etc. The path to the file, the name, subject etc. comes in a mysql table and the summaries show in a list on the site. Now here comes the problem, when you vote a summary up you go to the page up.php like this: <!--Directing to up.php--> --some mysql-- while ( $summary = mysql_fetch_assoc($result) ) { echo "<a href=\"up.php?id=".$summary['id']."&page=".$summary['class'].$summary['period']."\">"; } On the page up.php I have the following code which adds +1 in the thumbsup row in myqsl: <!-- thumbsup +1 --> --some mysql-- $sql2 = "UPDATE locatie SET thumbsup = thumbsup + '1' WHERE id='".strval($_GET['id'])."'"; $uitvoeren2 = mysql_query($sql2); and sends you back to the previous page header("Location: ".$_GET['page'].".php"); Google crawls all my pages, and also the page up.php?id=1&page=class1periode3 , which changes my mysql. Leading to that all of the summaries are being voted on by google, which is every annoying. This probably isn't the best voting script but I'm fairly new to php and thought this up on my own, so I was wondering if I could get it working properly Thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/251825-google-voting-and-clicking-on-pages/ Share on other sites More sharing options...
xyph Posted November 26, 2011 Share Posted November 26, 2011 Check this out! http://www.robotstxt.org/ Quote Link to comment https://forums.phpfreaks.com/topic/251825-google-voting-and-clicking-on-pages/#findComment-1291348 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.