I want to send a Javascript array to PHP using AJAX. This seems very simple code, but I am getting the "No isset" message.
<?php
if (isset($_REQUEST['activitiesArray'])) {
echo 'YES isset';
}else{
echo 'No isset';
}
?>
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript">
var activities = ["thing1", "thing2", "thing3"];
$.ajax({
type: "POST",
url: "JavatoDBase.php",
data: { activitiesArray : activities },
success: function() {
$("#lengthQuestion").fadeOut('slow');
}
});
Safari displays the following, which suggests the POST is operating