Ola,

Can somebody please help me out (I'm losing hair by the hour)?  I have two 
pages, index.php and setstyle.php.  If the user clicks the link on index.php it 
should send them to setstyle.php and automatically back to the index.php with a 
new session variable set ($style).  However, I am using sessions and when the 
header() function brings the user back to the index.php, it starts a whole new 
session (WHICH I DON'T WANT).   How do I preserve the old session from when 
index.php was first accessed?   Whoever can help me, I appreciate it greatly, 
and please respond to [EMAIL PROTECTED]  (The stupid thing is, I *actually* 
had this working at one point, then made a change and forgot what exactly I 
changed and can't restore it, sheesh...) 
                                                        
                                                           ahmad k. varoqua

index.php
--------------------------------
<?
session_start();
include("includes/globals.inc");
include("includes/functions.inc");

if ($style){
        bc_header("search", $style);
}
else{
        bc_header("search", $style2);
}

print("<a href=./setstyle.php?color=./css/bc_1.css><img src=./images/color1.jpg 
border=0></a>"); 

?>


setstyle.php
-------------------------------
<?
session_start();
session_register('style');
$style=$color;  

header ("location: $HTTP_REFERER");  //goes back to index.php 
?>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to