I have a hidden input, as follows -
<input type='hidden' id='question_number' name='question_number' value='100'/>
I need the value of question_number
into a php variable, without submitting.
I know that in jquery it can be done by -
var q_no = $('#question_number').val();
but I don't know how to send it to php variable.
Also I don't want to create a new file just to get the 'question_number' by ajax. I don't know if this is possible without submitting and without ajax.
p.s. I found a related question, but I couldn't not found working answer there.
Edit-1. I know that PHP is server-side and jquery/javascript is client side, before posting this question. But, I was thinking, if a php code, can search through entire page of this particular input type, and then parse its value. I am NOT a php expert, so I can't construct this on my own. I need this value in PHP for further coding.
Edit-2. Please read Edit 1, before negative voting.