Highlighted

PHP variable in my HTML5 ?

New Here ,
Aug 19, 2020

Copy link to clipboard

Copied

Hello,

 

Is there a way to show a PHP variable in my HTML5 animation ?

 

Thank you. 

Views

24

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

PHP variable in my HTML5 ?

New Here ,
Aug 19, 2020

Copy link to clipboard

Copied

Hello,

 

Is there a way to show a PHP variable in my HTML5 animation ?

 

Thank you. 

Views

25

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 19, 2020 0
kglad LATEST
Adobe Community Professional ,
Aug 19, 2020

Copy link to clipboard

Copied

if it's echo'd:

 

var xmlhttp;

if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
} else { // code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}

xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
alert(xmlhttp.responseText);
}
}

xmlhttp.open("GET", "date.php", true);
xmlhttp.send();

 

///////////////

where date.php:

 

<?php
$dateVar = date("M-d-Y g:i A");
echo $dateVar;
?>

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 19, 2020 0