Jump to content

Increment Number


Dysan

Recommended Posts

You can create the link like this

<a href="your_url.php?action=add">Click</a>

 

Then on "your_url.php" put this code

 

<?php

if (isset($_GET['action']) && $_GET['action'] == 'add'){
   $query = "UPDATE table SET number=number+1 WHERE condition";
   $result = mysql_query($query)or die(mysql_error());
   echo "DB updated";
}

?>

Link to comment
https://forums.phpfreaks.com/topic/77347-increment-number/#findComment-391589
Share on other sites

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.