Re: Store array as Session Variable

From: Date: Mon, 28 Jul 2003 20:18:08 +0000
Subject: Re: Store array as Session Variable
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-157237@lists.php.net to get a copy of this message
--- Pushpinder Singh Garcha <pgarcha@adelphia.net> 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 should mention that you will need a session_start() call on the page you wish to set session variables on as well as any page that you wish to read session variables from. > 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 = mysql_fetch_assoc($result)) > > { > > "<TR BGCOLOR=$bgcolor> > > <TD align=\"left\"><font color=\"#666666\" > > size=\"1\" > > face=\"Verdana, Arial, Helvetica, > > sans-serif\">$row[company]</font></TD> > > <TD align=\"left\"><font color=\"#666666\" > > size=\"1\" > > face=\"Verdana, Arial, Helvetica, > > > sans-serif\">$row[name_1]</font></TD> > > <TD align=\"left\"><font color=\"#666666\" > > size=\"1\" > > face=\"Verdana, Arial, Helvetica, > > sans-serif\">$row[phone_1]</font></TD> > > <TD align=\"left\"><font color=\"#666666\" > > size=\"1\" face=\"Verdana, > > Arial, Helvetica, sans-serif\">$row[city]</font></TD> > > <TD align=\"left\"><font color=\"#666666\" > > size=\"1\" face=\"Verdana, > > Arial, Helvetica, sans-serif\">$row[url]</font></TD> > > <TD align=\"left\"><font color=\"#666666\" > > size=\"1\" face=\"Verdana, > > Arial, Helvetica, sans-serif\">$row[email_1]</font></TD> > > <TD align=\"center\"><font color=\"#333333\" > > size=\"1\" > > face=\"Verdana, Arial, Helvetica, sans-serif\"><a > > > > href=\"full-profile.php?name=".$row['company']."\">--Link--</a></ > > > > font></TD> </TR>"; This is about the best example I've seen as to why stylesheets are handy. :-) Is there an echo in there that I missed? I don't see how this is being output. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/

« previous php.general (#157237) next »