PHP Classes
elePHPant
Icontem

File: chkusr.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of PLSCIS PLP  >  Simple PHP Web Chat  >  chkusr.php  >  Download  
File: chkusr.php
Role: Application script
Content type: text/plain
Description: normal request handler file to check user's identity
Class: Simple PHP Web Chat
Chat system with Websockets or AJAX as fallback
Author: By
Last change: changed role and description
Date: 1 year ago
Size: 914 bytes
 

Contents

Class file image Download
<?php
$name
= (isset($_POST['unm']))? $_POST['unm'] : '';
$email = (isset($_POST['eid']))? $_POST['eid'] : '';
$pass = (isset($_POST['pass']))? $_POST['pass'] : '';
$cpcode = (isset($_POST['cp']))? $_POST['cp'] : '';
if(
is_string($name)) { $name = trim($name); } else { $name = ''; }
if(
is_string($email)) { $email = trim($email); } else { $email = ''; }
if(
is_string($pass)) { $pass = trim($pass); } else { $pass = ''; }
if(
is_string($cpcode)) { $cpcode = trim($cpcode); } else { $cpcode = ''; }
$name = preg_replace('/[^A-Za-z0-9]/', '', $name);
$name = trim($name);
$return_val = 'error';
if(
$name != '' && $email != '' && $pass != '') {
    include_once(
'common.php');
    include_once(
$site_path.'classes'.DIRECTORY_SEPARATOR.'class.CheckUserIdentity.php');
   
$cui_obj = new CheckUserIdentity();
   
$return_val = $cui_obj->checkIdentity($name, $email, $pass, $cpcode);
}
echo
$return_val; exit;
?>