Here am sending a value month from a page to a php file named printall.php on clicking an image print.png. I get that value in printall.php by using GET method. I find the value of of month displaying in the address bar of the window which opens printall.php on Clicking print.png.
I want to hide or encode the value which displays in the address bar. Is that anyone to help me out with this little doubt ?
<a href="javascript:;" onclick="window.open('printall.php?id=<?php echo $month;?>');"><img src="print.png" width="25px" height="22px" style="border:0;" ></a>
Is $month the value of the current month, or is it based on user input? If it is the value of the current month, don’t bother sending it to your PHP script, just use PHP’s native datetime functions:
If $month is somehow based on user input, either of the other 2 answers would work, using AJAX or by submitting a form.