I have a website that receives parameters in the URL address (www.xxx.html?name=David
)
then I assign the value to the html text like this:
<span name="uname" id="uname"> </span>, I'd like to thank you
<script src="//code.jquery.com/jquery-1.12.0.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var userName = getParameterByName('uname');
document.getElementById("uname").textContent = userName;
});
</script>
up to this point everything works well
now when I try to read again the value in uname
in the PHP file in order to send it in the email I have two issues
- the parameter is not received -
emailText = $_POST['uname'];
- when trying to debug I see the
HTML
file andjs
file being loaded and can be debugged but thePHP
file doesn't exist in the file tree of the debug
BUT it is being loaded and read because other variables are being read and sent correctly to the email.