Archives for November 2011

PHP + PDO + FETCH_OBJ Issue + Notice: Trying to get property of non-object

ASSUMPTIONS: I’m expecting only 1 row of data for the fetch-ing I need the fetched-data to be in the form of an stdClass object You are familiar with using PDO – PHP Data Objects This PDO error typically occurs when you try to fetch data into an stdClass object by using fetchAll() By definition fetchAll […]

PHP 5.3 + How To Completely Destroy Session Variables In PHP

The Sessions Bonanza By default sessions are stored on the disk your server, you can find out the path by echo-ing for the attribute session.save_path: echo ini_get( “session.save_path” ); (You can change that path in php.ini) PHP Sessions are destroyed automatically when you close your browser. But what if you want to destroy the session […]