On 1 Oct 2008, at 20:42, Per Jessen wrote:
Stut wrote:
On 1 Oct 2008, at 11:40, Per Jessen wrote:
Alain Roger wrote:
how can i get the 'name' value for each row in this session stored
array ? thx.
You haven't stored an array in the session, you've tried to store an
object of class
Hi,
i have a 2 dim array defined as following:
class CBreadcrumb
{
// array holding the complete Breadcrumb
var $crumb = array();
/*
* Constructor
*/
function CBreadcrumb()
{
}
/*
* Add new stage
*/
function Add($name, $link,
Alain Roger wrote:
how can i get the 'name' value for each row in this session stored
array ? thx.
You haven't stored an array in the session, you've tried to store an
object of class CBreadcrumb. Which AFAIK isn't supported.
/Per Jessen, Zürich
--
PHP General Mailing List
On 1 Oct 2008, at 11:40, Per Jessen wrote:
Alain Roger wrote:
how can i get the 'name' value for each row in this session stored
array ? thx.
You haven't stored an array in the session, you've tried to store an
object of class CBreadcrumb. Which AFAIK isn't supported.
It is supported but
1 okt 2008 kl. 12.31 skrev Alain Roger:
...
later on i try to use the content of this array, bt without success.
Here is what i do:
$bci = array($_SESSION['bc']);
array_push($bci,$_SESSION['bc']);
foreach($bci as $key=$value)
{
echo bci : .$bci[$key]['name'];
echo br/;
}
how can i
On Wed, Oct 1, 2008 at 2:43 PM, Frank Arensmeier [EMAIL PROTECTED] wrote:
1 okt 2008 kl. 12.31 skrev Alain Roger:
...
later on i try to use the content of this array, bt without success.
Here is what i do:
$bci = array($_SESSION['bc']);
array_push($bci,$_SESSION['bc']);
later on i try to use the content of this array, bt without success.
Here is what i do:
$bci = array($_SESSION['bc']);
array_push($bci,$_SESSION['bc']);
foreach($bci as $key=$value)
{
echo bci : .$bci[$key]['name'];
echo br/;
}
how can i get the 'name' value for each row in
This is what i did afterall, but when i unserialize it like this way:
$bci = unserialize($_SESSION['bc']);
foreach($bci as $key=$value)
{
echo bci : .$key;
echo br/;
}
i get absolutely the same result as the code below.
in fact $key returns me the 2 variables
how about:
$bci = $_SESSION['bc'];
foreach($bci-crumb as myCrumb)
{
echo br/value['name'] :.$myCrumb['name'].br/;
echo br/value['link'] :.$myCrumb['link'].br/;
echo br/value['id'] : .$myCrumb['id'].br/;
}
You are wanting to loop through the crumbs rather than looping objects.
There
Stut wrote:
On 1 Oct 2008, at 11:40, Per Jessen wrote:
Alain Roger wrote:
how can i get the 'name' value for each row in this session stored
array ? thx.
You haven't stored an array in the session, you've tried to store an
object of class CBreadcrumb. Which AFAIK isn't supported.
It
[EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, July 29, 2003 1:00 AM
Subject: Re: [PHP] Store array as Session Variable
$details is empty !!
Thanks
--Pushpinder
On Monday, July 28, 2003, at 03:31 PM, CPT John W. Holmes wrote:
$details is an array (just like $company_name
hello All,
I am trying to store an array as a session variable.
while ($row = mysql_fetch_array($result))
{
if ( !is_array($company_name) ) $company_name = array();
array_push($company_name, $row['company']);
// try to register session variable
--- Pushpinder Singh Garcha [EMAIL PROTECTED] wrote:
I am trying to store an array as a session variable.
Based on your code, it looked like your question had little to do with storing
an array as a session variable. To do that, this works:
$_SESSION['myarray'] = $myarray;
while ($row =
$details is an array (just like $company_name was). Try to view
print_r($details); and see what you get.
---John Holmes...
- Original Message -
From: Pushpinder Singh Garcha [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 28, 2003 3:18 PM
Subject: [PHP] Store array as Session
PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 28, 2003 3:18 PM
Subject: [PHP] Store array as Session Variable
hello All,
I am trying to store an array as a session variable.
while ($row = mysql_fetch_array($result))
{
if ( !is_array($company_name) ) $company_name = array
--- Pushpinder Singh Garcha [EMAIL PROTECTED] wrote:
I am trying to store the value in row['company'] in an array
called $company_name.
I see now. I think you might find this a bit simpler (if I understand
correctly):
$company_name = array();
while ($row = mysql_fetch_assoc($result))
{
Thanks Chris,
I am able to see the contents of the $company_name array. The next
part involves storing this as a session variable.
I am trying to link this page to another search page using the a
href=\full-profile.php?name=.$row['company']. \--Link--/a
while ($row =
I am able to see the contents of the $company_name array. The next
part involves storing this as a session variable.
I am trying to link this page to another search page using the a
href=\full-profile.php?name=.$row['company']. \--Link--/a
If you're passing the company name in the URL,
--- Pushpinder Singh Garcha [EMAIL PROTECTED] wrote:
I am able to see the contents of the $company_name array. The
next part involves storing this as a session variable.
Assuming $company_name is set correctly, as you verified, this should suffice:
$_SESSION['company_name'] = $company_name;
I
Thanks John,
I used the $_GET['name'] on the next page to access the
selection.
http://psg.local/~psgarcha/CRM/full-profile.php?name=jack
http://psg.local/~psgarcha/CRM/full-profile.php?name=tim
http://psg.local/~psgarcha/CRM/full-profile.php?name=mary
--- Pushpinder Singh Garcha [EMAIL PROTECTED] wrote:
However if I decided to use the sessions approach how would I go about
it? I am just curious to find out why $_SESSION['company_name'] =
$company_name; duz not werk for me!
Did you use session_start() like I mentioned?
If so, you are
Hello Chris,
I am using session_start(). All the pages after the login page use
sessions and will redirect the user to the login page, if he/she is NOT
logged in. So I am guessing the error lies in my logic somewhere.
Thanks again.
--Pushpinder
On Monday, July 28, 2003, at 04:51 PM, Chris
--- Pushpinder Singh Garcha [EMAIL PROTECTED] wrote:
I am using session_start(). All the pages after the login page use
sessions and will redirect the user to the login page, if he/she is
NOT logged in.
You're not using IIS by chance are you? If so, I think you will find this link
helpful:
Hello Chris,
I am using Apache webserver on the MAc Jaguar OS Platform
Regards
--Pushpinder
On Monday, July 28, 2003, at 05:02 PM, Chris Shiflett wrote:
--- Pushpinder Singh Garcha [EMAIL PROTECTED] wrote:
I am using session_start(). All the pages after the login page use
sessions and will
); and see what you get.
---John Holmes...
- Original Message -
From: Pushpinder Singh Garcha [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 28, 2003 3:18 PM
Subject: [PHP] Store array as Session Variable
hello All,
I am trying to store an array as a session
25 matches
Mail list logo