<?php session_start(); if(isset($_SESSION['counter'])) { $_SESSION['counter'] = 1 + $_SESSION['counter']; // adds 2 // $_SESSION['counter'] = 1 + (int) $_SESSION['counter']; // adds 2 // $_SESSION['counter'] = 0.1 + $_SESSION['counter']; // adds 0.2 // $_SESSION['counter'] = 0 + $_SESSION['counter']; // does not add anything } else { $_SESSION['counter'] = 0; // start counter } // toggle previously used in a class, model or view // usually either 0 or 1 - true or false if( $_SESSION['counter'] % 2) { // do this } else { // do that }
Harro Verton wrote on Tuesday 6th of September 2011:Fuel doesn't use PHP sessions, or $_SESSION. Use Fuels Session class instead, it's much more secure. As you your issue, check your webserver and fuel logs. I'm reasonably sure you're missing an image or a favicon or so which is requested by chrome, and is rewritten to your Fuel app by your webserver...
It looks like you're new here. If you want to get involved, click one of these buttons!