I m trying to redirect page to 1stlink.php
along with a URL parameter. But after I redirect the user, the variable does not display on the page.
Why cant i get the value of variable
in my redirected page?
<html>... <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script>
$('#btn').click(function() { // The `$` reference here is a jQuery syntax. So we are loading jquery right before this script tag
var textval = $('#textcat').val();
window.location = "1stlink.php?variable=" + textval;
});
</script>
1stlink.php
<?php
echo $_GET['variable'];
?>