Re: [PHP-DB] Passing the value of a variable from PHP to JavaScript.
Here is the working code: function tes(){ document.write('JavaScript
'); o=document.getElementById('myselect'); window.location.replace('http://192.168.23.1/coba/coba.php?vtes='+o.value); } "; echo "diforward ke javascript"; echo "
Re: [PHP-DB] Passing the value of a variable from PHP to JavaScript.
Hi Prabu you need to add a few bits: in the function: function tes(){ vtes = theform.vtes.value; #added line document.write('JavaScript'); window.location.replace('http://127.0.0.1/coba/coba.php?vtes=' + vtes); #altered line in the body: and before the may be a bit ott but should work st