[SQL] Éxécuter une requête seulement lorsque le tableau est clické
Voilà je voudrais savoir comment effectuer un bloc de code php seulement quand on clic sur le tableau
J'ai essayer comme sa mais sa l'execute tout le temps et non seulement quand le tableau est cliké :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td onClick="<? $clickpub=1; ?>"><script type="text/javascript"><!--
google_ad_client = "pub-1545565301314501";
google_alternate_ad_url = "http://gadsense.php";
google_ad_width = 120;
google_ad_height = 240;
google_ad_format = "120x240_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "3D81EE";
google_color_bg = "C3D9FF";
google_color_link = "0000FF";
google_color_text = "000000";
google_color_url = "008000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></td></tr></table>
<? if($clickpub==1)
{
$requete = "UPDATE fk_membres SET points = points + 1, allowclick = allowclick + 1 WHERE pseudo IN ('$pseudom')";
mysql_query($requete);
}
?> |