calmchess Posted December 15, 2009 Share Posted December 15, 2009 I'm trying to destroy two specifc sessions but i can unset them using unset() the only thing i've found is session_unset(); but i don't think i can use this because there is 1 other session that i don't want destroyed.....please advise me on what approach i should take to destoying the desired sessions Quote Link to comment Share on other sites More sharing options...
corbin Posted December 15, 2009 Share Posted December 15, 2009 Do you mean session values when you say sessions? Assuming so. Anyway, you could just unset() like so: unset($_SESSION['blah']); Then $_SESSION['blah'] would no longer be set. Or do you mean something else? Quote Link to comment Share on other sites More sharing options...
calmchess Posted December 15, 2009 Author Share Posted December 15, 2009 i tried to unset here is the whole code. <?php session_start()?> <!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" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Model login</title> <META name="robots" content="index,follow"> <META name="revisit-after" content="10"> <META name="robots" content="all"> <meta name="author" content="root"> <META name="page-topic" content="live sexy web cams and chat"> <META name="copyright" content="privatechatnow.com,2009"> <META name="distribution" content="global"> <META name="ABSTRACT" CONTENT="Privatechatnow.com - Live video cam and chat"> <META name="rating" content="Mature"> <style type="text/css"><!-- body{ margin: 0; padding:0; } #lh-col{ position:absolute;top:115px;left:0;width:142px;z-index:3;border:1px solid black; } #rh-col{position:absolute;top:115px;right:0;width:142px;z-index:2;border:1px solid black; } #c-block {width:100%;z-index:1; height:80%;} #hdr{height:80px; width:100%; margin:0; } #nav{ height:25px; width:100%; margin:0; background-color:black; } #sep{ width:100%; height:10px; background-color:purple; margin:0; }#wrapper{width:724px;} .Nav0{float:left; padding:3px; color:white; height:20px; width:140px;} div a:link{color:white;} div a:visited {color: white;} div.Nav0:hover{background-color:grey;} .Nav1{float:left;margin-left:6px; padding:3px; height:20px; width:147px; color:white; } div.Nav1:hover{background-color:grey;} .Nav2{float:left; height:20px; width:90px; padding:3px; color:white; } div.Nav2:hover{background-color:grey;} .Nav3{ float:left; height:20px; width:90px; padding:3px; color:white; } div.Nav3:hover{background-color:grey;} .Nav4{float:left; margin-left:5px;height:20px; width:119px;padding:3px;color:white; } div.Nav4:hover{background-color:grey;} .Nav5{float:left; height:20px; width:76px; padding:3px; color:white; } div.Nav5:hover{background-color:grey;} #c-col3{ width:718px; height:500px; position:relative; z-index:5; } .ftr{ width:100%;height:35px; border-top:1px solid black;} div.ftr a:link{color:blue;} div.ftr a:visited{color:blue;} .fCon0{ height:50px; width:100%; }.reg{ width:743px; height:90px;}.full0{ width:701px; height:100px; background:black; color:white; border:10px solid gray; }.up0{width:100%; height:100px;position:absolute; top:200px;} div.up0 a:link{color:blue;} div.up0 a:visited{color:blue;} .span0{position:absolute;left:1px;}.span1{position:absolute;right:1px;} .span2{position:absolute;right:0px;top:-38px; height:60px; width:60px;background-image:url("http://www.privatechatnow.com/currentwebsite/Images/no4.gif"); background-repeat: no-repeat;}.span3{position:absolute;right:0px;top:-38px; height:60px; width:60px;background-image:url("http://www.privatechatnow.com/currentwebsite/Images/ok0.gif"); background-repeat: no-repeat;}.req0{color:red;}.span4{width:50px; height:25px;} div.span4 a:link{color:blue;} div.span4 a:visited{color:blue;} --> </style> <SCRIPT TYPE="text/javascript"> <!-- function popup(mylink, windowname) { if (! window.focus)return true; var href; if (typeof(mylink) == 'string') href=mylink; else href=mylink.href; window.open(href, windowname, 'width=400,height=200,scrollbars=yes'); return false; } //--> </SCRIPT> </head> <?php include("../secure_php/admin_database.php"); $id = $_GET['id']; $doc = $_GET['doc']; if(isset($_SESSION['setform'])){ ?> <div id="hdr"></div> <div id="nav" align="center"> <div id="wrapper"> <div class="Nav0" align="center"><a href="http://www.privatechatnow.com/currentwebsite/redirect_admin_register.html"> Model register </a></div> <div class="Nav1" align="center"><a href="http://www.privatechatnow.com/currentwebsite/index.html"> Current models </a></div> <div class="Nav2" align="center"><a href="http://www.privatechatnow.com/currentwebsite/redirect_client_main.html"> Login </a></div> <div class="Nav3" align="center"><a href="http://www.privatechatnow.com/currentwebsite/redirect_client_register.html"> Register </a></div> <div class="Nav4" align="center"><a href="http://www.privatechatnow.com/currentwebsite/redirect_admin_main.html"> Model login </a></div> <div class="Nav5" align="center"><a href="http://www.privatechatnow.com/currentwebsite/help_redirect.html"> Help </a></div> </div> </div> <div id="sep"></div> <div id="c-block" align="center"> <div id="c-col3" > <div class ="reg"align="left"> <div class="full0"align="center"> <?php if($doc == "form1"){ echo "<h2>Age verification</h2>"; } if($doc == "form2"){ echo "<h2>Model contract</h2>"; } if($doc == "form3"){ echo "<h2>Model release</h2>"; } if($doc == "form4"){ echo "<h2>ID&headshots</h2>"; } ?> </div> </div> <div class="up0"> <?php if($_SESSION['pic']==1){ echo '<b>Upload failed</b><span class ="span2"></span><span class=\"span4\"><a href=\"http://www.privatechatnow.com/currentwebsite/activation/activate.php?id=$id\">Back</a></span></div>'; unset($_SESSION['pic']); unset($_SESSION['setform']); }else{ echo "<b>Upload successful</b><span class =span3></span><br /><span class=\"span4\"><a href=\"http://www.privatechatnow.com/currentwebsite/activation/activate.php?id=$id\">Back</a></span></div>"; setform($id,$doc); unset($_SESSION['pic']); unset($_SESSION['setform']); } ?> </div> </div> </div> <div id="lh-col"></div> <div id="rh-col"></div> <div class="ftr" align="center" ><a href="http://www.privatechatnow.com/currentwebsite/">Terms of service</a> | <a href="http://www.privatechatnow.com/currentwebsite/">Privacy</a> | <a href="http://www.privatechatnow.com/currentwebsite/">Advertise with us</a> | <a href="http://www.privatechatnow.com/currentwebsite/">About us</a> |  <a href="http://www.privatechatnow.com/currentwebsite/">Contact Us</a> | <a href="http://www.privatechatnow.com/currentwebsite/help_redirect.html">Help</a> <div><small>Copyright © 2009--2009 privatechatnow.com. All Rights Reserved.</small></div></div> <?php unset($_SESSION['setform']); unset($_SESSION['pic']); die(0); } if(isset($_SESSION['setses21'])){ ?> <div id="hdr"></div> <div id="nav" align="center"> <div id="wrapper"> <div class="Nav0" align="center"><a href="http://www.privatechatnow.com/currentwebsite/redirect_admin_register.html"> Model register </a></div> <div class="Nav1" align="center"><a href="http://www.privatechatnow.com/currentwebsite/index.html"> Current models </a></div> <div class="Nav2" align="center"><a href="http://www.privatechatnow.com/currentwebsite/redirect_client_main.html"> Login </a></div> <div class="Nav3" align="center"><a href="http://www.privatechatnow.com/currentwebsite/redirect_client_register.html"> Register </a></div> <div class="Nav4" align="center"><a href="http://www.privatechatnow.com/currentwebsite/redirect_admin_main.html"> Model login </a></div> <div class="Nav5" align="center"><a href="http://www.privatechatnow.com/currentwebsite/help_redirect.html"> Help </a></div> </div> </div> <div id="sep"></div> <div id="c-block" align="center"> <div id="c-col3" > <div class ="reg"align="left"> <div class="full0"align="center"> <?php if($doc == "form1"){ echo "<h2>Age verification</h2>"; } if($doc == "form2"){ echo "<h2>Model contract</h2>"; } if($doc == "form3"){ echo "<h2>Model release</h2>"; } if($doc == "form4"){ echo "<h2>ID&headshots</h2>"; } ?> </div> <div class ="up0" align="right";> <span class="span0"><A href="https://www.privatechatnow.com/currentwebsite/activation/popup1.html"onClick="return popup(this, 'notes')">example</a></span> <span class="span1"> <form enctype=multipart/form-data method=post> <input type=file name=mailfile> <input type="submit" name="uploaded1" value="upload"/></form></span> <input type="submit" name="uploaded1" value = "upload"/></form> <?php echo "<br />".$_SESSION['err1'][0]."<br />".$_SESSION['err1'][1]?> </div> </div> </div> </div> <div id="lh-col"></div> <div id="rh-col"></div> <div class="ftr" align="center" ><a href="http://www.privatechatnow.com/currentwebsite/">Terms of service</a> | <a href="http://www.privatechatnow.com/currentwebsite/">Privacy</a> | <a href="http://www.privatechatnow.com/currentwebsite/">Advertise with us</a> | <a href="http://www.privatechatnow.com/currentwebsite/">About us</a> |  <a href="http://www.privatechatnow.com/currentwebsite/">Contact Us</a> | <a href="http://www.privatechatnow.com/currentwebsite/help_redirect.html">Help</a> <div><small>Copyright © 2009--2009 privatechatnow.com. All Rights Reserved.</small></div></div> <?php echo "isset"; unset ($_SESSION['err1']); unset ($_SESSION['setses21']); die(0); } $arr0 = array(); if (isset($_POST['uploaded1'])){ if(!$_FILES['mailfile']['size']||$_FILES['mailfile']['size']>0&&$_FILES['mailfile']['size']<4000||$_FILES['mailfile']['size']>5242880||$_FILES['mailfile']['type']!="image/gif"&&$_FILES['mailfile']['type']!="image/pjpeg"&&$_FILES['mailfile']['type']!="image/x-png"&&$_FILES['mailfile']['type']!="image/png"&&$_FILES['mailfile']['type']!="image/jpeg"&&$_FILES['mailfile']['type']!="image/bmp"&&$_FILES['mailfile']['type']!=null){ if($_FILES['mailfile']['size']>0&&$_FILES['mailfile']['size']<4000||$_FILES['mailfile']['size']>5242880){$arr0[0]='<small class="req0">between 4KB-5MB</small>';}else{$arr0[0]='<small>between 4KB-5MB</small>';} if($_FILES['mailfile']['type']!="image/gif"&&$_FILES['mailfile']['type']!="image/pjpeg"&&$_FILES['mailfile']['type']!="image/x-png"&&$_FILES['mailfile']['type']!="image/png"&&$_FILES['mailfile']['type']!="image/jpeg"&&$_FILES['mailfile']['type']!="image/bmp"&&$_FILES['mailfile']['type']!=null){$arr0[1]='<small class="req0">only .jpg .gif .png .bmp allowed</small>';}else{$arr0[1]=null;} $_SESSION['err1']=$arr0; $_SESSION['setses21']=true; header('Location: http://privatechatnow.com/currentwebsite/activation/upage.php?id='.$id."&doc=".$doc); return; } $getn = getuname($id); $type = $_FILES['mailfile']['type']; echo $type; if(stripos($type,'jpeg')!==False){ $type1 =".jpg"; } if(stripos($type,'gif')!==False){ $type1 =".gif"; } if(stripos($type,'png')!==False){ $type1 =".png"; } if(stripos($type,'bmp')!==False){ $type1 =".bmp"; } $newname = uniqid("leg").$type1; if(move_uploaded_file($_FILES['mailfile']['tmp_name'], "../legalstorage/$getn/$newname")){ $_SESSION['setform']=true; $_SESSION['pic']= 0; header('Location: http://privatechatnow.com/currentwebsite/activation/upage.php?id='.$id."&doc=".$doc); }else{ $_SESSION['setform']=true; $_SESSION['pic']= 1; header('Location: http://privatechatnow.com/currentwebsite/activation/upage.php?id='.$id."&doc=".$doc); } }else{ ?> <div id="hdr"></div> <div id="nav" align="center"> <div id="wrapper"> <div class="Nav0" align="center"><a href="http://www.privatechatnow.com/currentwebsite/redirect_admin_register.html"> Model register </a></div> <div class="Nav1" align="center"><a href="http://www.privatechatnow.com/currentwebsite/index.html"> Current models </a></div> <div class="Nav2" align="center"><a href="http://www.privatechatnow.com/currentwebsite/redirect_client_main.html"> Login </a></div> <div class="Nav3" align="center"><a href="http://www.privatechatnow.com/currentwebsite/redirect_client_register.html"> Register </a></div> <div class="Nav4" align="center"><a href="http://www.privatechatnow.com/currentwebsite/redirect_admin_main.html"> Model login </a></div> <div class="Nav5" align="center"><a href="http://www.privatechatnow.com/currentwebsite/help_redirect.html"> Help </a></div> </div> </div> <div id="sep"></div> <div id="c-block" align="center"> <div id="c-col3" > <div class ="reg"align="left"> <div class="full0"align="center"> <?php if($doc == "form1"){ echo "<h2>Age verification</h2>"; } if($doc == "form2"){ echo "<h2>Model contract</h2>"; } if($doc == "form3"){ echo "<h2>Model release</h2>"; } if($doc == "form4"){ echo "<h2>ID&headshots</h2>"; } ?> </div> <div class ="up0" align="right";> <span class="span0"><A href="https://www.privatechatnow.com/currentwebsite/activation/popup1.html"onClick="return popup(this, 'notes')">example</a></span> <span class="span1"> <form enctype=multipart/form-data method=post> <input type=file name=mailfile> <input type="submit" name="uploaded1" value="upload"/></form> </span><br /><br /> <small>between 4KB-5MB</small> </div> </div> </div> </div> <div id="lh-col"></div> <div id="rh-col"></div> <div class="ftr" align="center" ><a href="http://www.privatechatnow.com/currentwebsite/">Terms of service</a> | <a href="http://www.privatechatnow.com/currentwebsite/">Privacy</a> | <a href="http://www.privatechatnow.com/currentwebsite/">Advertise with us</a> | <a href="http://www.privatechatnow.com/currentwebsite/">About us</a> |  <a href="http://www.privatechatnow.com/currentwebsite/">Contact Us</a> | <a href="http://www.privatechatnow.com/currentwebsite/help_redirect.html">Help</a> <div><small>Copyright © 2009--2009 privatechatnow.com. All Rights Reserved.</small></div></div> <?php } ?> </body> </html> trying to unset unset($_SESSION['pic']); unset($_SESSION['setform']); Quote Link to comment Share on other sites More sharing options...
calmchess Posted December 15, 2009 Author Share Posted December 15, 2009 you probably don't want to sift through my code .....i can't get any freaking help because the script is 4 miles long. Quote Link to comment Share on other sites More sharing options...
corbin Posted December 15, 2009 Share Posted December 15, 2009 unset($_SESSION['pic']); unset($_SESSION['setform']); After you do that, have you tried doing a print_r($_SESSION) call to see if the $_SESSION array contains what you would expect? Quote Link to comment Share on other sites More sharing options...
calmchess Posted December 15, 2009 Author Share Posted December 15, 2009 i echoed the session on another page and it still exsists with the proper data even though i unset it ...its really weird. i've use unset before without any problem.....just this script won't unset maybe there is nothing wrong with unset and its my document stucture is setting it again after i unset could be the cause.....lets just abandon this thread and i'll figure it out on my own. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.