2 // Copyright (C) 2009 Rod Roark <rod@sunsetsystems.com>
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 2
7 // of the License, or (at your option) any later version.
9 function formData($name, $type='P') {
11 $s = isset($_POST[$name]) ?
$_POST[$name] : '';
12 else if ($type == 'G')
13 $s = isset($_GET[$name]) ?
$_GET[$name] : '';
15 $s = isset($_REQUEST[$name]) ?
$_REQUEST[$name] : '';
16 if (get_magic_quotes_gpc()) {$s = stripslashes($s);}
17 $s = mysql_real_escape_string($s);
21 function formTrim($s) {
22 if (get_magic_quotes_gpc()) {$s = stripslashes($s);}
23 $s = mysql_real_escape_string($s);