Reply to Re: Send array from php to php

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация