hi, i want to send some variables from a page to another but i don't want the user to can see my variables. how i can hide those using the session variables? this is my link: page.php?pid=<?php echo $row['pid'];?>&sl=0 Code (markup):
If the two files are opened in the same session you can save the value from this script in the $_SESSION array $_SESSION['pid'] = $row['pid']; and then in page.php you can access it with $_SESSION['pid'] This will work if you have session_start() at the beginning of both files. Another way of partialy hiding the variables is using the post method for form submittion. The average user cannot read your variables, but a professional still can, so $_SESSION is the better choice if you want higher security. Remember, security isn't just about hiding the variables, it's more about processing data the right way