Page 1 of 2

Clarification on $_SESSION variables [solved]

Posted: Fri Jul 08, 2005 12:55 pm
by dyonak
Ok, assuming I declare a session_start() at the beginning of my page if use the following code to declare my session variables:

Code: Select all

$_SESSION['x'] = 'something';
then I should be able to reference them on other pages like so:

Code: Select all

print $_SESSION['x'];
Correct?'x'] = 'something';


then I should be able to reference them on other pages like so:

Code: Select all

print $_SESSION['x'];
Correct?

Correct?wing code to declare my session variables:

Code: Select all

$_SESSION['x'] = 'something';
then I should be able to reference them on other pages like so:

Code: Select all

print $_SESSION['x'];lare a session_start() at the beginning of my page if use the following code to declare my session variables:

Code: Select all

$_SESSION['x'] = 'something';
then I should be able to reference them on other pages like so:

Code: Select all

print $_SESSION['x'];
Correct?517f958]
$_SESSION['x'] = 'something';


then I should be able to reference them on other pages like so:

Code: Select all

print $_SESSION['x'];
Correct?le to reference them on other pages like so:

Code: Select all

print $_SESSION['x'];
Correcp]
$_SESSION['x'] = 'something';


then I should be able to reference them on other pages like so:

Code: Select all

print $_SESSION['x'];
Correct?49517f958]
$_SESSION['x'] = 'something';


then I should be able to reference them on other pages like so:

Code: Select all

print $_SESSION['x'];
Correct?sion variables:

Code: Select all

$_SESSION['x'] = 'something';
then I should be able to reference them on other pages like so:

Code: Select all

print $_SESSION['x'];
Correct?y page if use the following code to declare my session variables:

Code: Select all

$_SESSION['x'] = 'something';
then I should be able to reference them on other pages like so:

Code: Select all

print $_SESSION['x'];
Correct?ething';


then I should be able to reference them on other pages like so:

Code: Select all

print $_SESSION['x'];
8]
print $_SESSION['x'];


Correct?f958]

Correct? of my page if use the following code to declare my session variables:

Code: Select all

$_SESSION['x'] = 'something';
then I should be able to reference them on other pages like so:

Code: Select all

print $_SESSION['x'];
Correct?er pages like so:

Code: Select all

print $_SESSION['x'];
Correct?to reference them on other pages like so:

Code: Select all

print $_SESSION['x'];
Correct?;'x'] = 'something';


then I should be able to rert() at the beginning of my page if use the following code to declare my session variables:

Code: Select all

$_SESSION['x'] = 'something';
then I should be able to reference them on other pages like so:

Code: Select all

print $_SESSION['x'];
Correct?on other pages like so:

Code: Select all

print $_SESSION['x'];
Correct?my page if use the following code to declare my session variables:

Code: Select all

$_SESSION['x'] = 'something';
then I should be able to reference them on other pages like so:

Code: Select all

print $_SESSION['x'];
Correct? of my page if use the following code to declare my session variables:

Code: Select all

$_SESSION['x'] = 'something';
then I should be able to reference them on other pages like so:

Code: Select all

print $_SESSION['x'];
Correct?tart() at the beginning of my page if use the following code to declare my session variables:

Code: Select all

$_SESSION['x'] = 'something';
then I should be able to reference them on other pages like so:

Code: Select all

print $_SESSION['x'];
Correct?
$_SESSION['x'] = 'something';


then I should be able to reference them on other pages like so:

Code: Select all

print $_SESSION['x'];
Correct?

Posted: Fri Jul 08, 2005 12:59 pm
by Burrito
did you try it 8O

Posted: Fri Jul 08, 2005 1:06 pm
by dyonak
C'mon Burrito cut me some slack, of course I did =P Hence the questioning (it didn't work =/)

Wierd part is that I know the sessions are working because the login works properly for me still. Things that should display while I'm logged in do, which is all based off session variables which from what I can see are declared and referenced in the exact same way as above.

Posted: Fri Jul 08, 2005 1:11 pm
by neophyte
See my explanation on Burrito's thread...


viewtopic.php?t=35327


Hope that helps.

Posted: Fri Jul 08, 2005 1:22 pm
by dyonak
Tried adding

Code: Select all

session_set_cookie_params ('.dustinyonak.net');
Before my session_start(); and it's still not working.

Here's the actual code I'm using (trying to make a css style switcher):

Code: Select all

print '<div id="navBar">styles<div id="sectionLinks">';
	print '<form action="index.php" method="post"><input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNav.css"> Light<input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNavblk.css"> Dark<input type="submit" name="submitstyle" value="switch style"></form></div>';
Here's the form handler:

Code: Select all

//Style sheet switcher v0.3b
if (isset ($_POST['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' href='$style' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
}
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
if (empty ($style)) {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' href='$style' 

type='text/css' />";
}
When I first choose my style and click submit it works. Once I change pages it goes back to my default style.ote;>';
print '<form action=&quote;index.php&quote; method=&quote;post&quote;&gt;&lt;input type=&quote;radio&quote; name=&quote;style&quote; value=&quote;http://www.dustinyonak.net/2col_rightNav.css&quote;&gt; Light&lt;input type=&quote;radio&quote; name=&quote;style&quote; value=&quote;http://www.dustinyonak.net/2col_rightNa ... &quote;&gt; Dark&lt;input type=&quote;submit&quote; name=&quote;submitstyle&quote; value=&quote;switch style&quote;&gt;&lt;/form&gt;&lt;/div>';


Here's the form handler:

Code: Select all

//Style sheet switcher v0.3b
if (isset ($_POST['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' href='$style' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
}
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
if (empty ($style)) {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' href='$style' 

type='text/css' />";
}
When I first choose my style and click submit it works. Once I change pages it goes back to my default style.eet' href='$style'

type='text/css' />";
} else {
print "<link rel='stylesheet'

href='http://www.dustinyonak.net/2col_rightNav.css'

type='text/css' />";
}
$style = $_POST['style'];
$_SESSION['style'] = $style;
if (empty ($style)) {
print "<link rel='stylesheet'

href='http://www.dustinyonak.net/2col_rightNav.css'

type='text/css' /&gt;&quote;;
} else {
print &quote;&lt;link rel='stylesheet' href='$style'

type='text/css' /&gt;&quote;;
}


When I first choose my style and click submit it works. Once I change pages it goes back to my default style.Here's the actual code I'm using (trying to make a css style switcher):

Code: Select all

print '<div id="navBar">styles<div id="sectionLinks">';
	print '<form action="index.php" method="post"><input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNav.css"> Light<input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNavblk.css"> Dark<input type="submit" name="submitstyle" value="switch style"></form></div>';
Here's the form handler:

Code: Select all

//Style sheet switcher v0.3b
if (isset ($_POST['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' href='$style' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
}
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
if (empty ($style)) {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' href='$style' 

type='text/css' />";
}
When I first choose my style and click submit it works. Once I change pages v id="sectionLinks">';
print '<form action="index.php" method="post"><input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNav.css"> Light<input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNa ... &quote;&gt; Dark&lt;input type=&quote;submit&quote; name=&quote;submitstyle&quote; value=&quote;switch style&quote;&gt;&lt;/form&gt;&lt;/div&gt;';


Here's the form handler:

Code: Select all

//Style sheet switcher v0.3b
if (isset ($_POST['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' href='$style' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
}
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
if (empty ($style)) {
	print "<link rel='stylesheet' 

href='http://wwdex.php" method="post"><input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNav.css"> Light<input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNavblk.css"> Dark<input type="submit" name="submitstyle" value="switch style"></form></div>';
Here's the form handler:

Code: Select all

//Style sheet switcher v0.3b
if (isset ($_POST['submitstyle'])) {
	$style = $_POST['s
Before my session_start(); and it's still not working.

Here's the actual code I'm using (trying to make a css style switcher):

Code: Select all

print '<div id="navBar">styles<div id="sectionLinks">';
	print '<form action="index.php" method="post"><input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNav.css"> Light<input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNavblk.css"> Dark<input type="submit" name="submitstyle" value="switch style"></form></div>';
Here's the form handler:

Code: Select all

//Style sheet switcher v0.3b
if (isset ($_POST['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' href='$style' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
}
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
if (empty ($style)) {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css'hp]
	session_set_cookie_params ('.dustinyonak.net');
Before my session_start(); and it's still not working.

Here's the actual code I'm using (trying to make a css style switcher):

Code: Select all

print '<div id="navBar">styles<div id="sectionLinks">';
	print '<form action="index.php" method="post"><input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNav.css"> Light<input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNavblk.css"> Dark<input type="submit" name="submitstyle" value="switch style"></form></div>';
Here's the form handler:

Code: Select all

//Style sheet switcher v0.3b
if (isset ($_POST&#t's still not working.

Here's the actual code I'm using (trying to make a css style switcher):

Code: Select all

print '&lt;div id=&quote;navBar">styles<div id="sectionLinks">';
	print '<form action="index.php" method="post">&lt;input type=&quote;radio&quote; name=&quote;style&quote; value=&quote;http://www.dustinyonak.net/2col_rightNav.css&quote;&gt; Light&lt;input type=&quote;radio&quote; name=&quote;style&quote; value=&quote;http://www.dustinyonak.net/2col_rightNavblk.css&quote;&gt; Dark&lt;input type=&quote;submit&quote; name=&quote;submitstyle&quote; value=&quote;switch style&quote;&gt;&lt;/form&gt;&lt;/div&gt;';
Here's the form handler:

Code: Select all

//Style sheet switcher v0.3b
if (isset ($_POST&#1111;'submitstyle'])) {
	$style = $_POST&#1111;'style'];
	$_SESSION&#1111;'style'] = $style;
	print &quote;&lt;link rel='stylesheet' href='$style' 

type='text/css' /&gt;&quote;;
	} else {
	print &quote;&lt;link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' /&gt;&quote;;
}
	$style = $_POST&#1111;'style'];
	$_SESSION&#1111;'style'] = $style;
if (empty ($style)) {
	print &quote;&lt;link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' /itcher):

Code: Select all

print '&lt;div id=&quote;navBar&quote;&gt;styles&lt;div id=&quote;sectionLinks&quote;&gt;';
	print '&lt;form action=&quote;index.php&quote; method=&quote;post&quote;&gt;&lt;input type=&quote;radio&quote; name=&quote;style&quote; value=&quote;http://www.dustinyonak.net/2col_rightNav.css&quote;&gt; Light&lt;input type=&quote;radio&quote; name=&quote;style&quote; value=&quote;http://www.dustinyonak.net/2col_rightNavblk.css&quote;&gt; Dark&lt;input type=&quote;submit&quote; name=&quote;submitstyle&quote; value=&quote;switch style&quote;&gt;&lt;/form&gt;&lt;/div&gt;';
Here's the form handler:

Code: Select all

//Style sheet switcher v0.3b
if (isset ($_POST&#1111;'submitstyle'])) {
	$style = $_POST&#1111;'style'];
	$_SESSION&#1111;'style'] = $style;
	print &quote;&lt;link rel='stylesheet' href='$style' 

type='text/css' /&gt;&quote;;
	} else {
	print &quote;&lt;link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' /&gt;&quote;;
}
	$style = $_POST&#1111;'style'];
	$_SESSION&#1111;'style'] = $style;
if (empty ($style)) {
	print &quote;&lt;link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' /&gt;&quote;;
	} else {
	print &quote;& and it's still not working.

Here's the actual code I'm using (trying to make a css style switcher):

Code: Select all

print '&lt;div id=&quote;navBar&quote;&gt;styles&lt;div id=&quote;sectionLinks&quote;&gt;';
	print '&lt;form action=&quote;index.php&quote; method=&quote;post&quote;&gt;&lt;input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNav.css"> Light<input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNavblk.css&quote;&gt; Dark&lt;input type=&quote;submit&quote; name=&quote;submitstyle&quote; value=&quote;switch style&quote;&gt;&lt;/form&gt;&lt;/div&gt;';
Here's the form handler:

Code: Select all

//Style sheet switcher v0.3b
if (isset ($_POST&#1111;'submitstyle'])) {
	$style = $_POST&#1111;'style'];
	$_SESSION&#1111;'style'] = $style;
	print &quote;&lt;link rel='stylesheet' href='$style' 

type='text/css' /&amp it's still not working.

Here's the actual code I'm using (trying to make a css style switcher):

Code: Select all

print '<div id="navBar">styles<div id="sectionLinks">';
	print '<form action="index.php" method="post"><input type="radio" name="style&quote; value=&quote;http://www.dustinyonak.net/2col_rightNav.css&quote;&gt; Light&lt;input type=&quote;radio&quote; name=&quote;style&quote; value=&quote;http://www.dustinyonak.net/2col_rightNavblk.css&quote;&gt; Dark&lt;input type=&quote;submit&quote; name=&quote;submitstyle&quote; value=&quote;switch style&quote;&gt;&lt;/form&gt;&lt;/div&gt;';
Here's the form handler:

Code: Select all

//Style sheet switcher v0.3b
if (isset ($_POST['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' href='$style' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
}
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
if (empty ($style)) {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' href='$style' 

type='text/css' />&ampmp;quote;index.php" method="post"><input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNav.css"> Light<input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNavblk.css"> Dark<input type="submit" name="submitstyle" value="switch style"></form></div>';
Here's the form handler:

Code: Select all

//Style sheet switcher v0.3b
if (isset ($_POST['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' href='$style' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
}
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
if (empty ($style)) {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' href='$style' 

type='text/css' />";
}
When I first choose my style and click submit it works. Once I change pages it goes back to my default style.name="style" value="http://www.dustinyonak.net/2col_rightNav.css"> Light<input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNavblk.css"> Dark<input type="submit" name="submitstyle" value="switch style"></form></div>';


Here's the form handler:

Code: Select all

//Style sheet switcher v0.3b
if (isset ($_POST&#1111;'submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' href='$style' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
}
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
if (empty ($style)) {
	print "&ore my session_start(); and it's still not working.

Here's the actual code I'm using (trying to make a css style switcher):

Code: Select all

print '<div id="navBar">styles<div id="sectionLinks">';
	print '<form action="index.php" method="post"><input type="radio" name="style&quote; value=&quote;http://www.dustinyonak.net/2col_rightNav.css&quote;> Light<input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNavblk.css"> Dark&lt;input type=&quote;submit&quote; name=&quote;submitstyle&quote; value=&quote;switch style&quote;&gt;&lt;/form&gt;&lt;/div&gt;';
Here's the form handler:

Code: Select all

//Style sheet switcher v0.3b
if (isset ($_POST['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
 ('.dustinyonak.net');
Before my session_start(); and it's still not working.

Here's the actual code I'm using (trying to make a css style switcher):

Code: Select all

print '<div id="navBar">styles<div id="sectionLinks">';
	print '<form action="index.php" method="post"><input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNav.css"> Light<input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNavblk.css"> Dark<input type="submit" name="submitstyle" value="switch style"></form></div>';
Here's the form handler:

Code: Select all

//Style sheet switcher v0.3b
if (isset ($_POST&#1111;'submitstyle'])) {
	$style = $_POST&#1111;'style'];
	$_SESSION&#1111;'style'] = $styactual code I'm using (trying to make a css style switcher):

Code: Select all

print '<div id="navBar">styles<div id=&quote;sectionLinks&quote;&gt;';
	print '&lt;form action=&quote;index.php&quote; method=&quote;post&quote;&gt;&lt;input type=&quote;radio&quote; name=&quote;style&quote; value=&quote;http://www.dustinyonak.net/2col_rightNav.css&quote;&gt; Light&lt;input type=&quote;radio&quote; name=&quote;style&quote; value=&quote;http://www.dustinyonak.net/2col_rightNavblk.css&quote;&gt; Dark&lt;input type=&quote;submit&quote; name=&quote;submitstyle&quote; value=&quote;switch style&quote;&gt;&lt;/form&gt;&lt;/div&gt;';
Here's the form handler:

Code: Select all

//Style sheet switcher v0.3b
if (isset ($_POST['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' href='$style' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
}
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
if (empty ($style)) {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' href='$style' 

type='text/css' />";
}
When I first choose my style and click submit it works. te;navBar">styles<div id="sectionLinks&quote;&gt;';
print '&lt;form action="index.php" method="post"><input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNav.css"> Light<input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNa ... &quote;&gt; Dark&lt;input type=&quote;submit&quote; name=&quote;submitstyle&quote; value=&quote;switch style&quote;&gt;&lt;/form&gt;&lt;/div&gt;';


Here's the form handler:

Code: Select all

//Style sheet switcher v0.3b
if (isset ($_POST['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' href='$style' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
}
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
if (empty ($style)) {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' href='$style' 

type='text/css' />";
}
When I first che="radio" name="style" value="http://www.dustinyonak.net/2col_rightNavblk.css"> Dark<input type=&quote;submit&quote; name=&quote;submitstyle&quote; value=&quote;switch style&quote;&gt;&lt;/form&gt;&lt;/div&gt;';


Here's the form handler:

Code: Select all

//Style sheet switcher v0.3b
if (isset ($_POST['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' href='$style' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='textlt;div id="sectionLinks">';
	print '<form action="index.php" method="post"><input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNav.css"> Light<input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNavblk.css"> Dark<input type="submit" name="submitstyle" value="switch style"></form></div>';
Here's the form handler:

Code: Select all

//Style sheet switcher v0.3b
if (isset ($_POST['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' href='$style' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
}
	$style = $_POST['style'];
	$_SESSION['stylearams ('.dustinyonak.net');
Before my session_start(); and it's still not working.

Here's the actual code I'm using (trying to make a css style switcher):

Code: Select all

print '<div id="navBar">styles<div id="sectionLinks">';
	print '<form action="index.php" method="post"><input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNav.css"> Light<input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNavblk.css"> Dark<input type="submit" name="submitstyle" value="switch style"></form></div>';
Here's the form handler:

Code: Select all

//Style sheet switcher v0.3b
if (isset ($_POST['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' href='$style' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
}
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
if (empty ($style)) {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' href='$style' 

type=]
print '<div id="navBar">styles<div id="sectionLinks">';
	print '<form action="index.php" method="post"><input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNav.css"> Light<input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNavblk.css"> Dark<input type="submit" name="submitstyle" value="switch style"></form></div>';
Here's the form handler:

Code: Select all

//Style sheet switcher v0.3b
if (isset ($_POST&#1111;'submitstyle'])) {
	$style = $_POST&#1111;'style'];
	$_SESSION&#1111;'style'] = $style;
	print &quote;&lt;link rel='stylesheet' href='$style' 

type='text/css' /&gt;&quote;;
	} else {
	print &quote;&lt;link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' /&gt;&quote;;
}
	$style = $_POST&#1111;'style'];
	$_SESSION&#1111;'style'] = $style;
if (empty ($style)) {
	print &quote;&lt;link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' /&gt;&quote;;
	} else {
	printher):

Code: Select all

print '<div id="navBar">styles&lt;div id=&quote;sectionLinks&quote;>';
	print '<form action="index.php" method="post"><input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNav.css"> Light<input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNavblk.css"&gt; Dark&lt;input type=&quote;submit&quote; name=&quote;submitstyle&quote; value=&quote;switch style&quote;&gt;&lt;/form&gt;&lt;/div&gt;';
Here's the form handler:

Code: Select all

//Style sheet switcher v0.3b
if (isset ($_POST['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' href='$style' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
}
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
if (empty ($style)) {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' href='$style' 

type='text/css' />";
}
[/php:1:35e0ea07e; name="style" value="http://www.dustinyonak.net/2col_rightNavblk.css"> Dark<input type="submit" name="submitstyle" value="switch style"></form></div>';
Here's the form handler:

Code: Select all

//Style sheet switcher v0.3b
if (isset ($_POST['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' href='$style' 

type='text/css' />&qlue="http://www.dustinyonak.net/2col_rightNav.css"> Light<input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNavblk.css"> Dark<input type="submit" name="submitstyle" value="switch style"></form></div>';
Here's the form handler:

Code: Select all

//Style sheet switcher v0.3b
if (isset ($_POST['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' href='$style' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
}
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
if (empty ($style)) {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' href='$style' 

type='text/css' />";
}
When I first choose my style and click submit it works. Once I change pages it goes back to my default style.
Here's the actual code I'm using (trying to make a css style switcher):

Code: Select all

print '<div id="navBar">styles<div id="sectionLinks">';
	print '<form action="index.php" method="post"><input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNav.css"> Light<input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNavblk.css"> Dark<input type="submit" name="submitstyle" value="switch style"></form></div>';
Here's the form handler:

Code: Select all

//Style sheet switcher v0.3b
if (isset ($_POST['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' href='$style' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
}
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
if (empty ($style)) {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
	} else {
	print "<link rel='styles	session_set_cookie_params ('.dustinyonak.net');
Before my session_start(); and it's still not working.

Here's the actual code I'm using (trying to make a css style switcher):

Code: Select all

print '<div id="navBar">styles<div id="sectionLinks">';
	print '<form action="index.php" method="post"><input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNav.css"> Light<input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNavblk.css"> Dark<input type="submit" name="submitstyle" value="switch style"></form></div>';
Here's the form handler:

Code: Select all

//Style sheet switcher v0.3b
if (isset ($_POSea07b1]
print '<div id="navBar">styles<div id="sectionLinks">';
	print '<form action="index.php" method="post"><input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNav.css"> Light<input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNavblk.css"> Dark<input type="submit" name="submitstyle" value="switch style"></form></div>';
Here's the form handler:

Code: Select all

//Style sheet switcher v0.3b
if (isset ($_POST['submitstyle'])) {
	$style = $_POST['style'];
s ('.dustinyonak.net');
Before my session_start(); and it's still not working.

Here's the actual code I'm using (trying to make a css style switcher):

Code: Select all

print '<div id="navBar">styles<div id="sectionLinks">';
	print '<form action="index.php" method="post"><input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNav.css"> Light<input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNavblk.css"> Dark<input type="submit" name="submitstyle" value="switch style"></form></div>';
Here's the form handler:

Code: Select all

//Style sheet switcher v0.3b
if (isset ($_POST&#11arams ('.dustinyonak.net');
Before my session_start(); and it's still not working.

Here's the actual code I'm using (trying to make a css style switcher):

Code: Select all

print '<div id="navBar">styles<div id="sectionLinks">';
	print '<form action="index.php" method="post"><input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNav.css"> Light<input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNavblk.css"> Dark<input type="submit" name="submitstyle" value="switch style"></form></div>';
Here's the form handler:

Code: Select all

//Style sheet switcher v0.3b
if (isset ($_POST['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' href='$style' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.
	session_set_cookie_params ('.dustinyonak.net');
Before my session_start(); and it's still not working.

Here's the actual code I'm using (trying to make a css style switcher):

Code: Select all

print '<div id="navBar">styles<div id="sectionLinks">';
	print '<form action="index.php" method="post"><input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNav.css"> Light<input type="radio" name="style" value="http://www.dustinyonak.net/2col_rightNavblk.css"> Dark<input type="submit" name="submitstyle" value="switch style"></form></div>';
Here's the form handler:

Code: Select all

//Style sheet switcher v0.3b
if (isset ($_POST['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' href='$style' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
}
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
if (empty ($style)) {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' href='$style' 

type='text/css' />";
}
When I first choose my style and click submit it works. Once I change pages it goes back to my default style.

Posted: Fri Jul 08, 2005 2:35 pm
by Burrito
do other session vars work?

try:

Code: Select all

print_r($_SESSION);
and see if that shows any session vars set...

one thing I noticed, you're using $style to define the location of the stylesheet and not $_SESSION['style'] which would make clear why it would work on the action page...I assume you're NOT doing the same on the others? If so, are you setting $style to the value of $_SESSION['style'] on those pages?

Code: Select all

$style = (isset($_SESSION['style']) ? $_SESSION['style'] : "default.css");
same on the others? If so, are you setting $style to the value of $_SESSION['style'] on those pages?

Code: Select all

$style = (isset($_SESSION['style']) ? $_SESSION['style'] : "default.css");
iced, you're using $style to define the location of the stylesheet and not $_SESSION['style'] which would make clear why it would work on the action page...I assume you're NOT doing the same on the others? If so, are you setting $style to the value of $_SESSION['style'] on those pages?

Code: Select all

$style = (isset($_SESSION&#1111;'style']) ? $_SESSION&#1111;'style'] : &quote;default.css&fcf30e]NOT[/b] doing the same on the others?  If so, are you setting $style to the value of $_SESSION['style'] on those pages?

Code: Select all

$style = (isset($_SESSION['style']) ? $_SESSION['style'] : "default.css");
of $_SESSION['style'] on those pages?

Code: Select all

$style = (isset($_SESSION['style']) ? $_SESSION['style'] : "default.css");
]

and see if that shows any session vars set...

one thing I noticed, you're using $style to define the location of the stylesheet and not $_SESSION['style'] which would make clear why it would work on the action page...I asars work?

try:

Code: Select all

print_r($_SESSION);
and see if that shows any session vars set...

one thing I noticed, you're using $style to define the location of the stylesheet and not $_SESSION['style'] which would make clear why it would work on the action page...I assume you're NOT doing the same on the others? If so, are you setting $style to the value of $_SESSION['style'] on those pages?

Code: Select all

$style = (isset($_SESSION['style']) ? $_SESSION['style'] : "default.css");
set...

one thing I noticed, you're using $style to define the location of the stylesheet and not $_SESSION['style'] which would make clear why it would work on the action page...I assume you're NOT doing the same on the others? If so, are you setting $style to the value of $_SESSION['style'] on those pages?

Code: Select all

$style =eet and not $_SESSION['style'] which would make clear why it would work on the action page...I assume you're [b]NOT[/b] doing the same on the others?  If so, aron vars set...

one thing I noticed, you're using $style to define the location of the stylesheet and not $_SESSION['style'] which would make clear why it would work on the action page...I assume you're [b]NOT[/b] doing the same on the others?  If so, are you setting $style to the value of $_SESSION['style'] on those pages?

Code: Select all

$style = (isset($_SESSION['style']) ? $_SESSION['style'] : "default.css");
rs set...

one thing I noticed, you're using $style to define the location of the stylesheet and not $_SESSION['style'] which would make clear why it would work on the action page...I assume you're NOT doing the same on the others? If so, are you setting $style to the value of $_SESSION['style'] on those pages?

Code: Select all

$style = (isset($_SESSION['style']) ? $_SESSION['style'] : &a the value of $_SESSION['style'] on those pages?

Code: Select all

$style = (isset($_SESSION['style']) ? $_SESSION['style'] : "default.css");
#1111;'style'] : "default.css");
f that shows any session vars set...

one thing I noticed, you're using $style to define the location of the stylesheet and not $_SESSION['style'] which would make clear why it would work on the action page...I assume you're NOT doing the same on the others? If so, are you setting $style to the value of $_SESSION['style'] on those pages?

Code: Select all

$style = (isset($_SESSION['style']) ? $_SESSION['style'] : "default.css");
nt_r($_SESSION);


and see if that shows any session vars set...

one thing I noticed, you're using $style to define the location of the stylesheet and not $_SESSION['style'] which would make clear why it would work on the action page...I assume you're NOT doing the same on the others? If so, are you setting $style to the value of $_SESSION['style'] on those pages?

Code: Select all

$style = (isset($_SESSION['style']) ? $_SESSION['style'] : "default.css");
e using $style to define the location of the stylesheet and not $_SESSION['style'] which would make clear why it would work on the action page...I assume you're NOT doing the same on the others? If so, are you setting $style to the value of $_SESSION['style'] on those pages?

Code: Select all

$style = (isset($_SESSION&#1111;'style']) ? $_SESSION&#1111;'style'] : &amld work on the action page...I assume you're [b]NOT[/b] doing the same on the others?  If so, are you setting $style to the value of $_SESSION['style'] on those pages?

Code: Select all

$style = (isset($_SESSION['style']) ? $_SESSION['style'] : "default.css");
]NOT[/b] doing the same on the others? If so, are you setting $style to the value of $_SESSION['style'] on those pages?

Code: Select all

$
print_r($_SESSION);
and see if that shows any session vars set...

one thing I noticed, you're using $style to define the location of the stylesheet and not $_SESSION['style'] which would make clear why it would work on the action page...I assume you're NOT doing the same on the others? If so, are you setting $style to the value of $_SESSION['se'] which would make clear why it would work on the action page...I assume you're NOT doing the same on the others? If so, are you setting $style to the value of $_SESSION['style'] on thos and not $_SESSION['style'] which would make clear why it would work on the action page...I assume you're NOT doing the same on the others? If so, are you setting $style to the value of $_SESSION['style'] on those pages?

Code: Select all

$style = (isset($_SESSION['style']) ? $_SESSION['style'] : "default.css");
.css");
ticed, you're using $style to define the location of the stylesheet and not $_SESSION['style'] which would make clear why it would work on the action page...I assume you're NOT doing the same on the others? If so, are you setting $style

Code: Select all

print_r($_SESSION);
and see if that shows any session vars set...

one thing I noticed, you're using $style to define the location of the stylesheet and not $_SESSION['style'] which would make clear why it would work on the action page...I assume you're NOT doing the same on the others? If so, are you setting $style to the value of $_SESSION['style'] on those pages?

Code: Select all

$style = (isset($_SESSION['style']) ? $_SESSION['style'] : "default.css");
['style'] which would make clear why it would work on the action page...I assume you're NOT doing the same on the others? If so, are you setting $style to the value of $_SESSION['style'] on those pages?

Code: Select all

$style = (isset($_SESSION['style']) ? $_SESSION['style'] : "default.css");
int_r($_SESSION);


and see if that shows any session vars set...

one thing I noticed, you're using $style to define the location of the stylesheet and not $_SESSION['style'] which would make clear why it would work on the action page...I assume you're NOT doing the same on the others? If so, are you setting $style to the value of $_SESSION['style'] on those pages?

Code: Select all

$style = (isset($_SESSION['style']) ? $_SESSION['style'] : "default.css");
print_r($_SESSION);


and see if that shows any session vars set...

one thing I noticed, you're using $style to define the location of the stylesheet and not $_SESSION['style'] which would make clear why it would work on the action page...I assume you're NOT doing the same on the others? If so, are you setting $style to the value of $_SESSION['style'] on those pages?

Code: Select all

$style = (isset($_SESSION['style']) ? $_SESSION['style'] : "default.css");

Posted: Fri Jul 08, 2005 2:54 pm
by dyonak
I changed the code so it's using the SESSION variable instead now, and also did a print_r(SESSION) on my main page. Play with the style switcher form and watch the array results and let me know what you think it might be if you have a minute please.

Oh, and here's the current code for the form handler:

Code: Select all

if (isset ($_POST['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' 

href='".$_SESSION['style']."' type='text/css' />";
	} else {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
}
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
if (empty ($style)) {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' href='".$_SESSION['style']."' 

type='text/css' />";
}
= $_POST['style'];
$_SESSION['style'] = $style;
print &quote;&lt;link rel='stylesheet'

href='&quote;.$_SESSIONї'style'].&quote;' type='text/css' /&gt;&quote;;
} else {
print &quote;&lt;link rel='stylesheet'

href='http://www.dustinyonak.net/2col_rightNav.css'

type='text/css' /&gt;&quote;;
}
$style = $_POSTї'style'];
$_SESSIONї'style'] = $style;
if (empty ($style)) {
print &quote;&lt;link rel='stylesheet'

href='http://www.dustinyonak.net/2col_rightNav.css'

type='text/css' /&gt;&quote;;
} else {
print &quote;<link rel='stylesheet' href='&quote;.$_SESSIONї'style'].&quote;'

type='text/css' /&gt;&quote;;
}
ay results and let me know what you think it might be if you have a minute please.

Oh, and here's the current code for the form handler:

Code: Select all

if (isset ($_POST['submitstyle'])) {
	$style = $_POST&#1111;'style'];
	$_SESSION&#1111;'style'] = $style;
	print &quote;&lt;link rel='stylesheet' 

href='&quote;.$_SESSION&#1111;'style'].&quote;' type='text/css' /&gt;&quote;;
	} else {
	print &quote;&lt;link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' /&gt;&quote;;
}
	$style = $_POST&#1111;'style'];
	$_SESSION&#1111;'style'] = $style;
if (empty ($style)) {
	print &quote;&lt;link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' /&gt;&quote;;
	} else {
	print &quote;&lt;link rel='stylesheet' href='&quote;.$_SESSION&#1111;'style'].&quote;' 

type='text/css' /&gt;&amT['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' 

href='".$_SESSION['style']."' type='text/css' />";
	} else {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
}
	$style = $_POST&#1111;'style'];
	$_SESSION&#1111;'style'] = $style;
if (empty ($style)) {
print "<link rel='stylesheet' 

href='".$_SESSION['style']."' type='text/css' />";
	} else {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
}
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
if (empty ($style)) {
	print "<link rel='stylesheet' 

hrnt_r(SESSION) on my main page. Play with the style switcher form and watch the array results and let me know what you think it might be if you have a minute please.

Oh, and here's the current code for the form handler:

Code: Select all

if (isset ($_POST&#1111;'submitstyle'])) {
	$style = $_POST&#1111;'style'];
	$_SESSION&#1111;'style'] = $style;
	print &quote;&lt;link rel='stylesheet' 

href='&quote;.$_SESSION&#1111;'style'].&quote;' type='text/css' /&gt;&quote;;
	} else {
	print &quote;&lt;link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' /&gt;&quote;;
}
	$style = $_POST&#1111;'style'];
	$_SESSION&#1111;'style'] = $style;
if (empty ($style)) {
	print &quote;&lt;link r so it's using the SESSION variable instead now, and also did a print_r(SESSION) on my main page. Play with the style switcher form and watch the array results and let me know what you think it might be if you have a minute please.

Oh, and here's the current code for the form handler:

Code: Select all

if (isset ($_POST['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' 

href='".$_SESSION['style']."' type='text/css' />";
	} else {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
}
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
if (empty ($style)) {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' href='".$_SESSION['style']."' 

type='text/css' />";
}her form and watch the array results and let me know what you think it might be if you have a minute please.

Oh, and here's the current code for the form handler:

Code: Select all

if (isset ($_POST['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' 

href='&quote;.$_SESSION&#1111;'style'].&quote;' type='text/css' /&gt;&quote;;
	} else {
	print &quote;&lt;link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' /&gt;&quote;;
}
	$style = $_POST&#1111;'style'];
	$_SESSION&#1111;'style'] = $style;
if (empty ($style)) {
	print &quote;&lt;link rel='stylesheet' 

hrve a minute please.

Oh, and here's the current code for the form handler:

Code: Select all

if (isset ($_POST['submitstyle'])) {
	$style = $_POST&#1111;'style'];
	$_SESSION&#1111;'style'] = $style;
	print &quote;&lt;link rel='stylesheet' 

href='&quote;.$_SESSION&#1111;'style'].&quote;' type='text/css' /&gt;&quote;;
	} else {
	print &quote;&lt;link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' /&gt;&quote;;
}
	$style = $_POST&#1111;'style'];
	$_SESSION&#1111;'style'] = $style;
if (empty ($style)) {
	print &quote;&lt;link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='texe switcher form and watch the array results and let me know what you think it might be if you have a minute please.

Oh, and here's the current code for the form handler:

Code: Select all

if (isset ($_POST&#1111;'submitstyle'])) {
	$style = $_POST&#1111;'style'];
	$_SESSION&#1111;'style'] = $style;
	print &quote;&lt;link rel='stylesheet' 

href='&quote;.$_SESSION['style']."' type='text/css' />";
	} else {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
}
	$style = $_POST['style'];
	$_SESSION['style'] = $sttcher form and watch the array results and let me know what you think it might be if you have a minute please.

Oh, and here's the current code for the form handler:

Code: Select all

if (isset ($_POST['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' 

href='".$_SESSION['style']."' type='text/css' />";
	} else {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
}
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
if (empty ($style)) {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
	} else {
	print "<li $style;
	print "<link rel='stylesheet' 

href='".$_SESSION['style']."' type='text/css' />";
	} else {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
}
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
if (empty ($style)) {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' href='".$_SESSION['style']."' 

type='text/css' />";
}
='text/css' />";
} else {
print "<link rel='stylesheet'

href='http://www.dustinyonak.net/2col_rightNav.css'

type='text/css' />";
}
$style = $_POST['style'];
$_SESSION['style'] = $style;
if (empty ($style)) {
print "<link rel='stylesheet'

href='http://www.dustinyonak.net/2col_rightNav.css'

type='text/css' />";
} else {
print "<link rel='stylesheet' href='&quote;.$_SESSIONї'style'].&quote;'

type='text/css' /&gt;&quote;;
}
ge. Play with the style switcher form and watch the array results and let me know what you think it might be if you have a minute please.

Oh, and here's the current code for the form handler:

Code: Select all

if (isset ($_POST['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' 

href='".$_SESSION['style']."' type='text/css' /&gt;&quote;;
	} else {
	print &quote;&lt;link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
}
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
if (empty ($snow, and also did a print_r(SESSION) on my main page. Play with the style switcher form and watch the array results and let me know what you think it might be if you have a minute please.

Oh, and here's the current code for the form handler:

Code: Select all

if (isset ($_POST['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' 

href='".$_SESSION['style']."' type='text/css' />";
	} else {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
}
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
if (empty ($style)) {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 
and let me know what you think it might be if you have a minute please.

Oh, and here's the current code for the form handler:

Code: Select all

if (isset ($_POST&#1111;'submitstyle'])) {
	$style = $_POST&#1111;'style'];
	$_SESSION&#1111;'style'] = $style;
	print &quote;&lt;link rel='stylesheet' 

href='&quote;.$_SESSION&#1111;'style'].&quote;' type='text/css' /&gt;&quote;;
	} else {
	print &quote;&lt;link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' /&gt;&quote;;
}
	$style = $_POST&#1111;'style'];
	$_SESSION&#1111;'style'] = $style;
if (empty ($style)) {
	print &quote;&lt;link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' /&gt;&quote;;
	} else {
	print &quote;&lt;link rel='stylesheet' href='&quote;.$_SESSION&#1111;'style'].&quote;' 

type='text/corm handler:

Code: Select all

if (isset ($_POST['submitstyle'])) {
	$style = $_POST&#1111;'style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' 

href='".$_SESSION['style']."' type='text/css' />";
	} else {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
}
	$style = $_POST['style'];
	$_SESSION&#1111;'style'] = $style;
if (empty ($style)) {
	print &quote;&lt;link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' /&gt;&quote;;
	} else {
	print &quote;&lt;link rel='stylesheet' href='&quote;.$_SESSION&#11rightNav.css' 

type='text/css' />";
}
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
if (empty ($style)) {
	print "&amp$_POST['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' 

href='&quote;.$_SESSION&#1111;'style'].&quote;' type='text/css' /&gt;&quote;;
	} else {
	print &quote;&lt;link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' /&gt;&amtead now, and also did a print_r(SESSION) on my main page. Play with the style switcher form and watch the array results and let me know what you think it might be if you have a minute please.

Oh, and here's the current code for the form handler:

Code: Select all

if (isset ($_POST['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print &quote;&lt;link rel='stylesheet' 

href='&quote;.$_SESSION&#1111;'style'].&quote;' type='text/css' /&gt;&quote;;
	} else {
	print &quote;&lt;link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' /&gt;&quote;;
}
	$style = $_POST&#1111;'style'];
	$_SESSION&#1111;'style'] = $style;
if (empty ($style)) {
	print &quote;&lt;link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' /&gt;&quote;;
	} else {
	priand here's the current code for the form handler:

Code: Select all

if (isset ($_POST&#1111;'submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' 

href='&quote;.$_SESSION&#1111;'style'].&quote;' type='text/css' /&gt;&quote;;
	} else {
	print &quote;&lt;link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' /&gt;&quote;;
}
	$style = $_POST&#1111;'style'];
	$_SESSION&#1111;'style'] = $style;
if (empty ($style)) {
	print &quote;&lt;link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNaa minute please.

Oh, and here's the current code for the form handler:

Code: Select all

if (isset ($_POST['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' 

href='".$_SESSION['style']."' type='text/css' />";
	} else {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
}
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
if (empty ($style)) {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' href='&amt/css' />";
}
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
if (empty ($style)) {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' href='".$_SESSION['style']."' 

type='text/css' />";
}
;;
} else {
print "<link rel='stylesheet'

href='http://www.dustinyonak.net/2col_rightNav.css'

type='text/css' />";
}
$style = $_POST['style'];
$_SESSION['style'] = $style;
if (empty ($style)) {
print &quote;&lt;link rel='stylesheet'

href='http://www.dustinyonak.net/2col_rightNav.css'

type='text/css' />";
} else {
print "<link rel='stylesheet' href='".$_SESSION['style'].&quote;'

type='text/css' /&gt;";
}
ray results and let me know what you think it might be if you have a minute please.

Oh, and here's the current code for the form handler:

Code: Select all

if (isset ($_POST&#1111;'submitstyle'])) {
	$style = $_POST&#1111;'style'];
	$_SESSION&#1111;'style'] = $style;
	print &quote;&lt;link rel='stylesheet' 

href='&quote;.$_SESSION&#1111;'style'].&quote;' type='text/css' /&gt;&quote;;
	} else {
	print &quote;&lt;link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' /&gt;&quote;;
}
	$style = $_POST&#1111;'style'];
	$_SESSION&#1111;'style'] = $style;
if (empty ($style)) {
	print &quote;&lt;link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' /&gt; SESSION variable instead now, and also did a print_r(SESSION) on my main page. Play with the style switcher form and watch the array results and let me know what you think it might be if you have a minute please.

Oh, and here's the current code for the form handler:

Code: Select all

if (isset ($_POST['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' 

href='".$_SESSION['style']."' type='text/css' />";
	} else {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
}
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
if (empty ($style)) {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' href='".$_SESSION['style']."' 

type='text/css' />";
Oh, and here's the current code for the form handler:

Code: Select all

if (isset ($_POST['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' 

href='".$_SESSION['style']."' type='text/css' />";
	} else {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
}
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
if (empty ($style)) {
	print "&am now, and also did a print_r(SESSION) on my main page. Play with the style switcher form and watch the array results and let me know what you think it might be if you have a minute please.

Oh, and here's the current code for the form handler:

Code: Select all

if (isset ($_POST['submitstyle'])) {
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
	print "<link rel='stylesheet' 

href='".$_SESSION['style']."' type='text/css' />";
	} else {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
}
	$style = $_POST['style'];
	$_SESSION['style'] = $style;
if (empty ($style)) {
	print "<link rel='stylesheet' 

href='http://www.dustinyonak.net/2col_rightNav.css' 

type='text/css' />";
	} else {
	print "<link rel='stylesheet' href='".$_SESSION['style']."' 

type='text/css' />";
}

Posted: Fri Jul 08, 2005 3:02 pm
by Burrito
dyonak wrote:and also did a print_r(SESSION) on my main page
that needs to be print_r[$_SESSION].

dyonak wrote:Play with the style switcher form and watch the array results and let me know what you think it might be if you have a minute please.
do you have a link?

Posted: Fri Jul 08, 2005 3:11 pm
by dyonak
The syntax for that is right in the code I just typed it out wrong here.

Here's the link - I'm dumb

Posted: Fri Jul 08, 2005 3:14 pm
by Burrito
ok, so it looks like it's working...no?

Posted: Fri Jul 08, 2005 3:18 pm
by dyonak
It changes the style sheet perfectly, yes. Now try to click on another page after you've selected "Dark" and submitted. It doesn't stick.

Posted: Fri Jul 08, 2005 3:19 pm
by Burrito
do you have session_start() included on all of those pages?

Posted: Fri Jul 08, 2005 3:23 pm
by pickle
Burrito wrote:
dyonak wrote:and also did a print_r(SESSION) on my main page
that needs to be print_r[$_SESSION].
Not quite:

Code: Select all

print_r($_SESSION);
:lol:ote]

Not quite:

Code: Select all

print_r($_SESSION);
:lol:) on my main page[/quote]

that needs to be print_r[$_SESSION].
[/quote]

Not quite:

Code: Select all

print_r($_SESSION);
:lol:"Burrito"]
dyonak wrote:and also did a print_r(SESSION) on my main page
that needs to be print_r[$_SESSION].
[/quote]

Not quite:

Code: Select all

print_r($_SESSION);
:lol: print_r[$_SESSION].
[/quote]

Not quite:

Code: Select all

print_r($_SESSION);
:lol:SESSION);


:lol:s to be print_r[$_SESSION].
[/quote]

Not quite:

Code: Select all

print_r($_SESSION);
:lol:be print_r[$_SESSION].
[/quote]

Not quite:

Code: Select all

print_r($_SESSION);
:lol:dbf0ea1f]

that needs to be print_r[$_SESSION].
[/quote]

Not quite:

Code: Select all

print_r($_SESSION);
:lol:o did a print_r(SESSION) on my main page[/quote]

that needs to be print_r[$_SESSION].
[/quote]

Not quite:

Code: Select all

print_r($_SESSION);
:lol:a1f]

Not quite:

Code: Select all

print_r($_SESSION);
:lol:d also did a print_r(SESSION) on my main page[/quote]

that needs to be print_r[$_SESSION].
[/quote]

Not quite:

Code: Select all

print_r($_SESSION);
:lol:1f]

:lol:SION);


:lol:uote]

Not quite:

Code: Select all

print_r($_SESSION)fdbf0ea1f="dyonak"]and also did a print_r(SESSION) on my main page[/quote]

that needs to be print_r[$_SESSION].
[/quote]

Not quite:

Code: Select all

print_r($_SESSION);
:lol:dbf0ea1f]

:lol:so did a print_r(SESSION) on my main page[/quote]

that needs to be print_r[$_SESSION].
[/quote]

Not quite:

Code: Select all

print_r($_SESSION);
:lol:

Posted: Fri Jul 08, 2005 3:24 pm
by dyonak
Yes the beginning of my header.php, this file is included in every page on my site.

Code: Select all

<?php
	session_start();
	header("Cache-control: private");
e-control: private");

Code: Select all

<?php
	session_start();
	header("Cache-control: private");
of my header.php, this file is included in every page on my site.

Code: Select all

<?php
	session_start();
	header("Cache-control: private");
;
header("Cache-control: private");
start();
header("Cache-control: private&quote;);
();
header("Cache-control: private");
amp;lt;?php
session_start();
header("Cache-control: private");
very page on my site.

Code: Select all

<?php
	session_start();
	header("Cache-control: private");
private");
in every page on my site.

Code: Select all

<?php
	session_start();
	header("Cache-control: private");
he-control: private");
this file is included in every page on my site.

Code: Select all

<?php
	session_start();
	header("Cache-control: private");
every page on my site.

Code: Select all

<?php
	session_start();
	header("Cache-control: private");

Posted: Fri Jul 08, 2005 3:27 pm
by Burrito
pickle wrote: Not quite:

Code: Select all

print_r($_SESSION);
:lol:
damn you 8O

ok, try putting print_r($_SESSION) in your included file and see what you come up with...also did you change the $style to the $_SESSION['style'] on all of your pages? print_r($_SESSION) in your included file and see what you come up with...also did you change the $style to the $_SESSION['style'] on all of your pages?['style'] on all of your pages?/php]

:lol:[/quote]

damn you 8O

ok, try putting print_r($_SESSION) in your included file and see what you come up with...also did you change the $s"pickle"]
Not quite:

Code: Select all

print_r($_SESSION);
:lol:[/quote]

damn you 8O

ok, try putting print_r($_SESSION) in your included file and see what you come up with...also did you change the $style to the $_SESSION['style'] on all of your pages?ou 8O

ok, try putting print_r($_SESSION) in your included file and see what you come up with...also did you change the $style to the $_SESSION['style'] on all of your pages?/b] in your included file and see what you come up with...also did you change the $style to the $_SESSION['style']
damn you 8O

ok, try putting print_r($_SESSION) in your included file and see what you come up with...also did you change the $style to the $_SESSION['style'] on all of your pages? you 8O

ok, try putting print_r($_SESSION) in your included file and see what you come up with...also did you change the $style to the $_SESSION['style'] on all of your pages?[/quote]

damn you 8O

ok, try putting print_r($_SESSION) in your included file and see what you come up with...also did you change the $style to the $_SESSION['style'] on all of your pages?
print_r($_SESSION);


:lol:[/quote]

damn you 8O

ok, try putting print_r($_SESSION) in your included file and see what you come up with...also did you change the $style to the $_SESSION['style'] on all of your pages?0883840f27]([/b]$_SESSION) in your included file and see what you come up with...also did you change the $style to the $_SESSION[th...also did you change the $style to the $_SESSION['style'] on all of your pages?SSION['style'] on all of your pages?f27]
print_r($_SESSION);


:lol:[/quote]

damn you 8O

ok, try putting print_r($_SESSION) in your included file and see what you come up with...also did you change the $style to the $_SESSION['style'] on all of your pages?uded file and see what you come up with...also did you change the $style to the $_SESSION['style'] on all of your pages?0883840f27] in your included file and see what you come up with...also did you change the $style to the $_SESSION['style'] on all of your pages?g print_r($_SESSION)[/b:08838te:

Code: Select all

print_r($_SESSION);
:lol:[/quote]

damn you 8O

ok, try putting print_r($_SESSION) in your included file and see what you come up with...also did you change the $style to the $_SESSION['style'] on all of your pages?r included file and see what you come up with...also did you change the $style to the $_SESSION['style'] on all of your pages?
print_r($_SESSION);


:lol:[/quote]

damn you 8O

ok, try putting print_r($_SESSION) in your included file and see what you come up with...also did you change the $style to the $_SESSION['style'] on all of your pages?