Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- how long do $_POST variables stay active, and how does PHP decide what goes in the post array?
- <pre>
- $user = $_POST['user'];
- $pass = $_POST['pass'];
- if(isset($user) && $user !== null){
- if(isset($pass) && $pass !== null)
- echo 'true'
- else
- echo 'false';
- }
- </pre>
- <pre>
- $.post('script.php',{user: 'username'}) -> posts to the script, but doesn't
- return anything, as in this case it would return false
- <em>5 minutes later</em>
- $.post('script.php',{pass: 'password'}, function(data){
- alert("data returned: " + data);
- });
- </pre>
Add Comment
Please, Sign In to add comment