<?php
/**
 * Processing Forget password form data:
 * check data then generate new password and send it through SMPT Email
 *
 * PHP version 7.3
 *
 * @package        SMS
 * @version        Release 1.0.0
 * @create_by      Mohammad aljaouni
 * @create_date    10-08-2020
 * @edited_by      Mohammad aljaouni
 * @last_edit_date 10-08-2020
 * @todo           Nothing
 */
ob_start();
session_start();
$chain = "AWdrh78y892Djk*^523*%$#ghgHGHia&%$*)AsfdsLJnLaad";
include("validateLogin.php");
include("includeInformation.php");

$tempMsgResult = mysqli_query($conn, "SELECT `idCategory`,`msg`,`viewMsg` FROM `temp_msg` WHERE `id`=$_POST[msgId]");
$tempMsgData = mysqli_fetch_array($tempMsgResult);
$tempMsgValues = array();

$tempMsgValues[] = iconv('Windows-1256', 'UTF-8', $tempMsgData['msg']);
$tempMsgValues[] = $tempMsgData['idCategory'];
$tempMsgValues[] = $tempMsgData['viewMsg']+1;
echo json_encode($tempMsgValues);
ob_end_flush();
?>
