Re: Help: Arrays with Session Variables not happening

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



K ..my problem seems to be combining echo on the menu
values with the print array.  If I echo $array[0];
that seems to work fine !?


Stuart
--- Stuart Felenstein <stuart4m@xxxxxxxxx> wrote:

> Back again , sorry :)
> 
> I had my form set up with 7 multi selects , on the
> return page, all 7  arrays were returned correctly. 
> Now that I've changed back 5 to regular menu selects
> (1 selection), the 2 arrays left won't return the
> values.   The menus work fine.
> 
> Here is my code:
> 
> Page 1:
> 
> <?php
> session_start();
> 
> if ( empty( $_SESSION['l_industry'] ) ) {
> $_SESSION['l_industry']=array();
> }
> 
> if ( is_array( $_REQUEST['LurkerIndustry'] ) ) {
> $_SESSION['l_industry'] = array_unique(
> array_merge( $_SESSION['l_industry'],
>  $_REQUEST['LurkerIndustry'] )
> );
> }
> if ( empty( $_SESSION['l_tterm'] ) ) {
> $_SESSION['l_tterm']=array();
> }
> 
> if ( is_array( $_REQUEST['LurkerTaxTerm'] ) ) {
> $_SESSION['l_tterm'] = array_unique(
> array_merge( $_SESSION['l_tterm'],
>  $_REQUEST['LurkerTaxTerm'] )
> );
> }
> ?>
> <?php
> $LurkerEdu = $_REQUEST['LurkerEdu'];
> $LurkerAuth  = $_REQUEST['LurkerAuth'];
> $LurkerExperience  = $_REQUEST['LurkerExperience'];
> $LurkerLevel  = $_REQUEST['LurkerLevel'];
> $LurkerSecurity = $_REQUEST['LurkerSecurity'];
> ?>
> 
> 
> Page 2:
> 
> <?php
> session_start();
> ?>
> 
> 
> 
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
> Transitional//EN"
>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> 
> <body>
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html;
> charset=iso-8859-1">
> </head>
> <?php
> 
> echo "\$LurkerEdu = ".$LurkerEdu."<br/>";
> echo "\$LurkerAuth = ".$LurkerAuth."<br/>";
> echo "\$LurkerExperience =
> ".$LurkerExperience."<br/>";
> echo "\$LurkerLevel = ".$LurkerLevel."<br/>";
> echo "\$LurkerSecurity = ".$LurkerSecurity."<br/>";
> 
> 
> 
> if ( is_array( $_SESSION['LurkerIndustry'] ) ) {
> print "<b>Your industry:</b><ol>\n";
> foreach ( $_SESSION['LurkerIndustry'] as $p2 ) {
> print "<li>$p2</li>";
> }
> print "</ol>";
> }
> 
> if ( is_array( $_SESSION['LurkerTaxTerm'] ) ) {
> print "<b>Your tax type:</b><ol>\n";
> foreach ( $_SESSION['LurkerTaxTerm'] as $p6 ) {
> print "<li>$p6</li>";
> }
> print "</ol>";
> }
> ?>
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux