Hello all, essentially i am grabbing a variable from the query string and i need to pass that value into another script. allow me to explain;
usually i use this code to display a persons email address from the query string onto the page using document.write
<script>
function getQueryVariable(variable) {
var query = window.location.search.substring(1);
var vars = query.split(“&”);
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split(“=”);
if (pair[0] == variable) {
return pair[1];
}
}
document.write(”);
}
</script>
then i would display the var with this
<script> document.write( getQueryVariable(“Contact0Email”) ); </script>
————
ok so here is what i need to do. my client sent me the code below asking me to pass the email var into the javascript and image. my programmer friend said to use php and do smething like;
<SCRIPT language=”javascript” src=”
<NOSCRIPT><IMG src=”
this syntax does not work;
<? echo . $_GET[‘Contact0Email’]; ?>
WHAT DO YOU GUYS THINK? Is the syntax wrong or are there better methods?