php form POST- variable can't increment -



php form POST- variable can't increment -

i'd increment variable on clicking submit button name="ticker".

$speed = 0; if ( isset($_post['ticker'])){ echo $speed++; }

what want able repeatedly click button , see 1 added total each time clicked. seems work 1 time , stays @ "1". why?

session_start(); if(!isset($_session['speed'])) $_session['speed'] = 0; if(isset($_post['ticker'])){ /* if there value set */ $_session['speed']++; /* increment 1 */ }

php

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

c# - Create a Notification Object (Email or Page) At Run Time -- Dependency Injection or Factory -

Set Up Of Common Name Of SSL Certificate To Protect Plesk Panel -