SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict
    Join Date
    Mar 2005
    Posts
    273
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Angry session deletioon problem

    Hello people

    i have a few names stored in sessions and i need to delete them

    what i do is try to match the names and if they did i can delete them...

    i am unable to match the names and thus unable to delete them

    please help

    the code i use is

    <?php
    session_start();

    $removed = array();

    $removed = $_POST['move'];

    for($i=0; $i<sizeof($removed); $i++)
    {

    if( $_SESSION['option'] == $removed[$i] )
    {
    unset($_SESSION['option']);
    }
    ?>
    <meta http-equiv="refresh" content="0;URL=mp3.php">


    please helpo me out awaiting u r replies guys!

  2. #2
    SitePoint Addict
    Join Date
    Mar 2005
    Posts
    273
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    help guys!

  3. #3
    Dinah-Moe Humm mudshark's Avatar
    Join Date
    Dec 2003
    Posts
    1,072
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is $removed a numeric-key/value array? $_POST isn't in most cases - unless you set it up as such in the form. What does print_r($_POST) give you?
    Also: you're missing a closing bracket after the for loop.

  4. #4
    SitePoint Addict
    Join Date
    Mar 2005
    Posts
    273
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    guys please help me!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •