PHP Classes
elePHPant
Icontem

File: admin/actions/send_user_message.php

Recommend this page to a friend!
  Classes of Miguel Villaseņor  >  MKCS PHP Support Chat  >  admin/actions/send_user_message.php  >  Download  
File: admin/actions/send_user_message.php
Role: Example script
Content type: text/plain
Description: Example script
Class: MKCS PHP Support Chat
Chat with clients of a support site
Author: By
Last change:
Date: 2 years ago
Size: 379 bytes
 

Contents

Class file image Download
<?php
require_once '../session_initializer.php';
require_once
'../../classes/User.php';

if(isset(
$_SESSION['user_id'])){

if(isset(
$_POST['message'])&&$_POST['message']!=""){
   
$user= User::getUser($_SESSION['user_id']);
   
$user->sendMessage($_POST['message'], $_POST['id']);
    echo
"{status :200}";
}else{
    echo
"{status :400}";
}

}else{
     echo
"{status :400}";
}