Hi i have a variable that I would like to somehow become a php variable without using ajax
The answer on stackoverflow mid page SEEMS right, and everything in my environment mimics his example but i still cannot get it to work
I do not think this is possible. You cannot mix server side and client side code. You can however as have others suggested on stackoverflow assign variable to form element and pass it to your PHP script as form post action.
You can post your code and errors if you want to get additional help.
I keep getting returned an Emptry string. Any ideas?
The php file >>>
var test = "hello";
document.getElementByID("someinput").value = test;
<form action="some.php" id="someinput" method="post">
<input type="hidden" id="someinput2" name="someinput"/>
<input type="submit" value="send"/>
<input type="hidden" id="someinput2" name="someinput"/> is empty, aka has no value=...
Create, Share, and Debug HTML pages and snippets with a cool new web app I helped create: pagedemos.com
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)