| 
	
 | 
 Posted by Andy Jeffries on 05/15/06 13:01 
On Fri, 12 May 2006 03:20:02 -0700, Manish wrote: 
> The problem is that howmuch times I click on Flip Horizontal , it is done 
> on the original picture, I want it to be on the latest edited one. 
> 
> I tried using session, but it didn't worked 
>  
> if(count($_SESSION["imagers"])) { 
> 	$imagers = $_SESSION["imagers"][count($_SESSION["imagers"])-1]; 
> } else { 
> 	$image = "photo_full.jpg"; 
> 	$imagers = LoadJpeg($image); 
> } 
> $_SESSION["imagers"][count($_SESSION["imagers"])] = $imagers; 
 
This code should work.  Have you tried doing a print_r or var_dump on 
$_SESSION after doing a single operation? 
 
BTW, that last line can be written a lot more simply as: 
 
$_SESSION["imagers"][] = $imagers; 
 
Cheers, 
 
 
Andy 
 
 
--  
Andy Jeffries MBCS CITP ZCE   | gPHPEdit Lead Developer 
http://www.gphpedit.org       | PHP editor for Gnome 2 
http://www.andyjeffries.co.uk | Personal site and photos
 
[Back to original message] 
 |