I have this:
main.php:
ID: <input name="id" id="id" type="text" size="20" value="<?php echo $_POST['id']; ?>"><br>
Password: <input name="password" id="password" type="password" value="<?php echo $_POST['password']; ?>" size="20">
File main.php is index page.
File main.php is a form with action=”main.php”
When i go from main.php to console.php, i dont get the values id and password.
When i go from main.php to plugins.php, i dont get the values id and password.
From main.php, you can get into plugins.php and console.php. But you don’t get the values then.
I know why it happens.
How to fix this? How can i make, that when i go to console.php, or plugins.php, the fields will stay remembered?
Sessions are too hard for me to learn. Is there any other solution?
Too hard? Put simply, at the top of every page you want to use sessions with, use
session_start(). Now, you want to save something to a session?So, in your case, maybe something like:
I feel bad for spoon-feeding you with it, but basic session functionality is really all that’s needed in the case you’re describing, and it’s probably the easiest way to pass around sensitive info, and is basically what sessions were made for.
For more info: