| Posted by Michael Fesser on 01/19/08 10:52 
..oO(sahm)
 >I' try to send array from web page to php file
 >but no data are show
 >I'm using session to store data
 >and this is my code
 >////////////////////////////////////////////////////////////////////////
 
 Call session_start() at the beginning of each(!) page.
 
 >$data = $cart_items;
 >	session_register('data');
 
 session_register() is deprecated. Simply use the $_SESSION array
 instead:
 
 $_SESSION['data'] = $cart_items;
 
 >and this is my php code to get the data
 >////////////////////////////////////////////////////////
 
 session_start();
 
 ><?php
 >foreach ($data as $item)
 
 foreach ($_SESSION['data'] as $item) {
 ...
 }
 
 Also check your error_reporting directive in your php.ini (set it to
 E_ALL|E_STRICT) and register_globals (should be off).
 
 Micha
  Navigation: [Reply to this message] |