I am having some trouble with session variables. You see, I have a session that tracks the user name of a person on my site.
Code: Select all
<?php
session_start();
global 1, Henaro;
session_register("logged");
session_register("usen");
if(!isset(1) || 1 == FALSE){
echo "Log in or <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> yourself.";
exit;
}
?>Code: Select all
fwrite($fi, "
<?php
session_start();
global $logged, $usen;
session_register(\"logged\");
session_register(\"usen\");
if(!isset($logged) || $logged == FALSE){
echo \"Log in or <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> yourself.\";
exit;
}
?>
<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
<html xmlns=\"http://www.w3.org/1999/xhtml\">
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />
<title>BBS</title>
<script language=\"JavaScript\" type=\"text/JavaScript\">
function sendText(e, text)
{
e.value+=text
}
</script>
</head>
<LINK REL=stylesheet HREF=\"../../style.css\" TYPE=\"text/css\">
<body>
<?PHP include(\"../../ban.php\"); ?>
<div id=\"header\"><center>CommaBunny</center></div>
<div id=\"right\"><?PHP include('../../right.txt'); ?><br />
<Br /></div>
<div id=\"left\">Navigation<hr id=\"nav\"/><a href=\"../../index2.php\">Home</a><br /><a href=\"../../bbs.php\">BBS</a><Br /><a href=\"../../media.php\">Media</a><br /><a href=\"../../about.php\">About Us</a></div>
<div id=\"center\">
<center><table class=\"alttable\">
<tr bordercolor=\"#000000\" class=\"anothertable\">
<td width=\"600\" height=\"53\"><center>
<i>"$title"</i>
</center></td>
</tr>
</table></center>
<br />
<p align=\"center\">
<?PHP
include(\"http://commabunny.com/admin/an.txt\");
?>
<br>
<?PHP
include(\"../show_post.php\");
?>
</p>
<br />
<form action=\"post_reply.php\" method=\"post\" name=\"lolform\">
<p>
<input type=\"text\" name=\"title\" value=\"Title\" size=\"60\" class=\"form\"/>
<input type=\"checkbox\" name=\"checkbox3\" value=\"1\" checked=\"checked\">
<br />
<input type=\"text\" name=\"sauce\" value=\"Sauce\" size=\"60\" class=\"form\"/>
<input type=\"checkbox\" name=\"checkbox1\" value=\"1\" checked=\"checked\">
<br />
|<a name=\"reply2\"><font color=\"#ffffff\">>></font></a><a href='#reply2' onClick=\"sendText(document.form.posting, '')\">[b]</a><a href='#reply2' onClick=\"sendText(document.form.posting, '')\">[i]</a><a href='#reply2' onClick=\"sendText(document.form.posting, '[ascii][/ascii]')\">[ascii]</a>|<a href=\"http://commabunny.com/BBSHELP.php\">[Help]</a>|<br />
<textarea name=\"posting\" rows=\"10\" cols=\"100\" class=\"bunny\" id=\"posting\">Your post.</textarea>
<br />
<input type=\"submit\" name=\"Submit\" value=\"Submit\" class=\"altButton\" vspace=\"\"/><input type\"reset\" class=\"altButton\" />
</form> <br></div>
<div id=\"footer\"><center>Created by <a href=\"mailto:assbone@gmail.com\">Henaro</a>.</center></div>
</body>
</html>
");Code: Select all
$username = $usen;Code: Select all
<?php
session_start();
global $logged, $usen;
session_register(\"logged\");
session_register(\"usen\");
if(!isset($logged) || $logged == FALSE){
echo \"Log in or <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> yourself.\";
exit;
}
?>Code: Select all
<?
session_start();
global 1, Henaro;
session_register("logged");
session_register("usen");
if(!isset(1) || 1 == FALSE){
echo "Log in or <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> yourself.";
exit;
}
?>Anyone know a way around this? :/
Thanks,
Henaro
PS- I tried to make this as short as possible.