You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
745 B

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
<script>
$(document).on('click','#save',function() {
var vehicle = ['a','b','d'];
$.ajax({
data: {
vehicle:vehicle
},
type: "post",
url: "save.php",
success: function(data){
alert(data)
}
});
});
</script>
</head>
<body>
<button id="save" name="save">Serialize form values</button>
</body>
</html>
<?php
session_start();
if(isset($_SESSION['idpartie'])){
$vehicle=$_SESSION['idpartie'];
print_r($vehicle);
}
?>