I have a wierd problem (wierd to me as a noobie that is)...
and a document.getElementById('hw').innerHTML = response; statement puts the string value between <div> tags in the html page.
Simple. However, I've found that if the PHP tries to either echo a string directly:
echo "Hello World";
or assign it to a variable first and then echo the variable:
$x="Hello World"; echo "$x";
However, if the string is stored in a .txt file, and I retrieve it from the file, assign it to a variable, and then echo the variable, it works!
The same thing happens with numbers.
So whenever I want to assign a value to a variable and send it back, I have to store it in a file first, then retrieve it and echo it. There must be a better way. How do I just send the value stright back