Hi,

is it possible to use Ajax send request using php string as an Input?

like this:

Code:
function ajaxFunction() {
  var getdate = new Date();l
  if(xmlhttp) { 
  //	var txtname = document.getElementById("txtname");
    xmlhttp.open("POST","testing.php",true); 
    xmlhttp.onreadystatechange  = handleServerResponse;
    xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    xmlhttp.send("txtname=" + $test); // im not sure if this is correct to call the php string
  }
}

<?php

$test = "ABCDEF";

?>
i want to use php string '$test' as an input. is this really possible?