minor internationalization bug fix
[openemr.git] / library / formdata.inc.php
blob33a056a6d80e420617edce63027bb4d5357427cb
1 <?php
2 // Copyright (C) 2009 Rod Roark <rod@sunsetsystems.com>
3 //
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') {
10 if ($type == 'P')
11 $s = isset($_POST[$name]) ? $_POST[$name] : '';
12 else if ($type == 'G')
13 $s = isset($_GET[$name]) ? $_GET[$name] : '';
14 else
15 $s = isset($_REQUEST[$name]) ? $_REQUEST[$name] : '';
16 if (!get_magic_quotes_gpc()) $s = addslashes($s);
17 return $s;
20 function formTrim($s) {
21 if (!get_magic_quotes_gpc()) $s = addslashes($s);
22 return trim($s);