Re: [PHP] Store array as Session Variable

2003-07-29 Thread Pradeep D'souza
Message - From: "Pushpinder Singh Garcha" <[EMAIL PROTECTED]> To: "CPT John W. Holmes" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, July 29, 2003 1:00 AM Subject: Re: [PHP] Store array as Session Variable > $details is empty !! > &g

Re: [PHP] Store array as Session Variable

2003-07-28 Thread Rob Adams
"Pushpinder Singh Garcha" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > $details is empty !! > I'd check your sql query and see if any rows are being returned. Also, put the initializing of the array ($company_name = array()) outside of your loop, just in case. I used to think t

Re: [PHP] Store array as Session Variable

2003-07-28 Thread Pushpinder Singh Garcha
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 re

Re: [PHP] Store array as Session Variable

2003-07-28 Thread Chris Shiflett
--- 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

Re: [PHP] Store array as Session Variable

2003-07-28 Thread Pushpinder Singh Garcha
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 Shi

Re: [PHP] Store array as Session Variable

2003-07-28 Thread Chris Shiflett
--- 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

Re: [PHP] Store array as Session Variable

2003-07-28 Thread Pushpinder Singh Garcha
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 http://psg.local/~psgarcha/CRM/fu

Re: [PHP] Store array as Session Variable

2003-07-28 Thread Chris Shiflett
--- 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;

Re: [PHP] Store array as Session Variable

2003-07-28 Thread CPT John W. Holmes
> 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 href=\"full-profile.php?name=".$row['company']. "\">--Link-- If you're passing the company name in the

Re: [PHP] Store array as Session Variable

2003-07-28 Thread Pushpinder Singh Garcha
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 --Link-- while ($row = mysql_fetch_assoc($result)) { " $row[company] sans-serif\">$

Re: [PHP] Store array as Session Variable

2003-07-28 Thread Chris Shiflett
--- 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)) {

Re: [PHP] Store array as Session Variable

2003-07-28 Thread Pushpinder Singh Garcha
$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 was). Try to view print_r($details); and see what you get. ---John Holmes... - Original Message - From: "Pushpinder Singh Garcha" <[EMAI

Re: [PHP] Store array as Session Variable

2003-07-28 Thread CPT John W. Holmes
$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 Se

Re: [PHP] Store array as Session Variable

2003-07-28 Thread Chris Shiflett
--- 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 =