Answer the question
In order to leave comments, you need to log in
User notification by email. Is there a joint here?
Here comes the data from ajax
<?php
$model=new models_List;
$id=$_POST['id'];
$user_id = $_POST['user_id'];
$email = Models_UserData::getUserEmail($user_id);
unset($_POST['url']);
unset($_POST['id']);
unset($_POST['user_id']);
if($model->manageOrder($_POST, $id, $user_id)) {
$response = array("msg" => "Заказ отредактирован, клиент уведомлен по Email", "status" => true);
$model->orderNotice($email);
}
else
$response = array("msg" => "Не удалось отредактировать заказ", "status" => false);
echo json_encode($response);
?>
if($model->manageOrder($_POST, $id, $user_id)) {
$response = array("msg" => "Заказ отредактирован, клиент уведомлен по Email", "status" => true);
$model->orderNotice($email);
}
$model->manageOrder
$model->orderNotice($email);
Answer the question
In order to leave comments, you need to log in
As if it's normal. But it's better to filter POST data from (XSS,SQL) injections.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question