Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php like button counter

<?php
session_start();

if(isset($_POST['likes']))
    ++$_SESSION['likeTemp'];

?>
<form method="post">
<table>
<td><?php echo "Blabla";  ?></td> 
<td><?php echo "Trololo"; ?></td>
<td>
<?php 
    if(isset($_SESSION['likeTemp']))
        echo $_SESSION['likeTemp'];
    else
    {
        $_SESSION['likeTemp'] = 1;
        echo $_SESSION['likeTemp']; 
    }
?>
<input type="submit" value="like" name="likes"></td>
</table>
Comment

PREVIOUS NEXT
Code Example
Php :: get_distance 
Php :: Donut chart in PHP 
Php :: wp wc php remove product from cart if amount is 0 
Php :: wp php blog info background image 
Php :: run specific seeder laravel 
Php :: laravel gigapay list invoice 
Php :: how to get file name in upload images in php 
Php :: webiste url filter with pregx 
Php :: php execute powershell script with parameters 
Php :: deleted_at 
Php :: pass array from controller laravel with compact 
Php :: GZIP COMPRESSION Using PHP 
Php :: how to delete single row from grid in magento 
Php :: tina4 create route 
Php :: php variable undefined inside function argument 
Php :: amazon ami 2 php ini 
Php :: php browser detection script 
Php :: php collapse common columns in associative array 
Php :: datetime-local laravel migration data type 
Php :: acf blocks register block with enqueue script 
Php :: laravel permit only some inputs 
Php :: numeros positivos input laravel 
Php :: get base class name laravel 
Php :: HASHING in php double scripting 
Php :: phpstormda php faylning tepasiga avto kommet yozish 
Php :: ubuntu where are laravel logs stored 
Php :: PHP nl2br — Inserts HTML line breaks before all newlines in a string 
Php :: doctrine findby regex 
Php :: in packagemanifest.php line 131 undefined index name 
Php :: php print array as string 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =