Jump to content

[SOLVED] PHP - Mysql Help Please


paulman888888

Recommended Posts

<?php

if ($thegameid = (int)$_GET['gameid'])
{
        	mysql_query("UPDATE players SET players = players + 1 WHERE id= $thegameid");
	}
else
{
               echo ('error'); 
}
?>

 

If the value isn't int that will return 0.

If $_GET['game'] = '123abc' that will return $thegameid = 123.

 

--

jelly.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.