Jump to content

Google voting and clicking on pages


TheT

Recommended Posts

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  :P

 

Thanks in advance

 

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.