I have a form which has two input field called firstname and lastname with a submit button called submit. The input fields use twitter's typeahead.js with custom event trigger (typeahead:selected)
Thus, when the firstname is selected from the dropdown, I have a ajax call in the trigger which post the enrollment no of the selected person to another php page(xyz.php).
Here on xyz.php
If I store that enrollment number in a variable$link = POST['number'];
Now this works just fine.
But the problem is when I click my button I have another AJAX call to the same php file. And now I cannot use $link. It says Notice: Undefined index: number
Is there anyway I can get my variable to store the data permanently?