Last active
August 24, 2019 03:44
-
-
Save jaffreyjoy/c67bc472d0af82957ebd771293f1dbc2 to your computer and use it in GitHub Desktop.
PHP <--> JS (data)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//send data to a php file using AJAX | |
$.ajax({ | |
type: 'POST', | |
url: 'del_table.php', | |
data: {'variable': myval}, | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//get data from php variable | |
var myval = "<?php echo $date ?>"; | |
//get js variable sent through AJAX | |
$date=$_POST['variable']; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment