Login   Register  
PHP Classes
elePHPant
Icontem

File: inc/function.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Victor Mendonša  >  New MySQL  >  inc/function.php  >  Download  
File: inc/function.php
Role: Auxiliary script
Content type: text/plain
Description: Some general functions
Class: New MySQL
Retrieve, update and delete MySQL table records
Author: By
Last change:
Date: 3 years ago
Size: 379 bytes
 

Contents

Class file image Download
<?php

if (!defined('SomeThing') || !SomeThing) {
    die(
"<h1>Error</h1>");
}

function 
get($get) {
    return (isset(
$_GET[$get]) ? mysql_real_escape_string($_GET[$get]) : false);
}

function 
post($post) {
    return (isset(
$_POST[$post]) ? mysql_real_escape_string($_POST[$post]) : false);
}

function 
plural($var){
    return (
$var >= 2) ? "s" null;
}

?>