PHP warning

Undefined global variable $_SESSION

/home3/jilan/public_html/protected/views/site/marketplace.php(55)

43     $rupees=$_POST['rupees'];
44     $content=$_POST['content'];
45    if($_FILES['image']['name']){
46         move_uploaded_file($_FILES['image']['tmp_name'], "upload/".$_FILES['image']['name']);
47          $image=$_FILES['image']['name'];
48     }
49          
50    $query = mysqli_query($GLOBALS["mysqli_con"], "INSERT INTO marketpalace (link,title,rupees,image,content) VALUES ('$link','$title','$rupees','$image','$content')");
51     }
52     ?>
53 <div class="button-container" style="padding-left: 88%;">
54 <?php
55 $id = $_SESSION['userfolder'];
56 $jilan = mysqli_query($GLOBALS["mysqli_con"], "SELECT * FROM `login` WHERE userfolder = '$id'");
57  while ($rew = mysqli_fetch_array($jilan)) {
58       if ($rew['accesstype'] == 1) {
59         echo '<button id="applyButton" class="apply" onclick="openForm()">ADD ITEM</button>';
60     }
61  }
62  ?>
63     <div id="popupForm" class="popup-form">
64     <form action="" method="post" enctype="multipart/form-data">
65        <input type="text" name="title"placeholder= "Title">
66         <input type="text" name="rupees"placeholder= "Ruppes">
67        <input type="text" name="link" placeholder= "link">

Stack Trace

#4
+
 /home3/jilan/public_html/protected/controllers/SiteController.php(99): CController->render("marketplace")
094     }
095     public function actionImagesGallery() {
096         $this->render('imagesgallery');
097     }
098     public function actionMarketplace() {
099         $this->render('marketplace');
100     }
101     public function actionEcommerce() {
102         $this->render('ecommerce');
103     }
104     
#12
+
 /home3/jilan/public_html/index.php(22): CApplication->run()
17     defined('YII_DEBUG') or define('YII_DEBUG', true);
18 // specify how many levels of call stack should be shown in each log message
19     defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3);
20 
21     require_once($yii);
22     Yii::createWebApplication($config)->run();
23 }  
2026-03-10 16:47:32 Apache Yii Framework/1.1.10