1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to clear only one variable in the session in php

Discussion in 'PHP' started by dogitalweb, Jul 8, 2010.

  1. #1
    I am developing application which is having lots of session variables in php. I am even using login details in the session too, what i want is to clear few variables but keep my login details in the session, how can i clear particular session variable and not all?
     
    dogitalweb, Jul 8, 2010 IP
  2. Rainulf

    Rainulf Active Member

    Messages:
    373
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    85
    #2
    You do either this:
    $_SESSION['watever'] = "";
    PHP:
    Or this:
    unset($_SESSION['watever']);
    PHP:
    :)
     
    Rainulf, Jul 8, 2010 IP