How to delete data based on value in session variable

前端 未结 3 455
后悔当初
后悔当初 2021-01-21 12:05

add.php(When user click add photo)

  
3条回答
  •  走了就别回头了
    2021-01-21 12:25

    To use session variables, please add session_start() at the begin of your files, otherwise they aren't used. Secondly you are adding an array into a next array. so you have to use $_SESSION["auctionImages"] = $auctionImage; or

    $key=array_search($a[0],$_SESSION['auctionImages']);

    Further debugging can be done by print_r($_SESSION); so you can track the contents of this array

提交回复
热议问题