var foo = function(){
var img = document.createElement('img');
img.style.width="1px";img.style.height="1px";img.style.position='absolute';img.style.top='-1px';img.style.left="-1px";
img.src="https://stackoverflow.com/questions/7899791/putYourPHPfileHere.php?myValue="+document.getElementById('Stdgrade').value;
img.onload = function(){document.body.removeChild(this);};
document.body.appendChild(img);
};
works for me 😉
in the putYourPHPfileHere.php
you can retrieve the value by
$_GET['myValue']
solved html variable to php variable in same page [closed]