Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67441

I want to set a session and link customer id with tour id inside a session

$
0
0

I want to link customer id with tour id and store them in a session but every time I click submit I get the message that my session doesn't exist, which means it's not being set.

I tried doing this.

   session_start();

   extract($_POST);`enter code here`
   if(isset($_SESSION['requests'])){
   $_SESSION['requests']= array($cid,$tid);

   }
    <html>
    <body>
    <form method="post" action='InsertMakeTourReservation.php'>

        CustomerID:<input name='cid' /> <br />
        TourID:<input name='tid' /> <br />

            <input type='submit' value="Submit" />
         </form>
        </body>
    </html>

When I click submit my form should execute the action, but the if condition immediately gives me session does not exist.


Viewing all articles
Browse latest Browse all 67441

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>