Answer the question
In order to leave comments, you need to log in
js array not seeing js?
Php return an array in js (When submitting a form)
but js does not see
it cw89937.tmweb.ru
PHP :
<?php
if(isset($_GET['route'])) {
$name = $_POST['name'];
$phone = $_POST['phone'];
$adr = $_POST['adr2'];
$title = $_POST['title'];
$price = $_POST['price'];
$date = array('adr2' => $_POST['adr2'], 'name' => $_POST['name'], 'phone' => $_POST['phone'], 'price' => $_POST['price'], 'title' => $_POST['title']);
$array = array('name' => $_POST['name'], 'phone' => $_POST['phone'],'adr2' => $_POST['adr2'], 'date' => $date, 'message' => 'ok', 'name' => $name, 'phone' => $phone, 'price' => $price, 'title' => $title);
echo json_encode($array);
exit;
}
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question