I am creating a script and I came across a problem. I am having to use $_POST and $_GET on the same page, which I don't think makes sense.
I get the value for user id using the GET method from another page through a link and I have to input data from a form into the database in the current page.
CODE SNIPPET 1 : (GET METHOD on page page.php)
echo "<td align=center width=90px height=10px><strong><a href='sessions.php?id=".$userid."' style=text-decoration:none><font color='red' size='5pt'>$i</font></a></strong></td>";
You can use one hidden input field in your form in session.php and store $_GET['id'] in value attribute of that input field and it will be pass with your form submit to session.php
<input type="hidden" value="<?php echo $_GET['id']">