Changeset 1487 for trunk/include
- Timestamp:
- Jul 21, 2006, 3:44:22 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions.inc.php
r1400 r1487 461 461 } 462 462 463 function pwg_stripslashes($value) 464 { 465 if (get_magic_quotes_gpc()) 466 { 467 $value = stripslashes($value); 468 } 469 return $value; 470 } 471 472 function pwg_addslashes($value) 473 { 474 if (!get_magic_quotes_gpc()) 475 { 476 $value = addslashes($value); 477 } 478 return $value; 479 } 480 481 function pwg_quotemeta($value) 482 { 483 if (get_magic_quotes_gpc()) { 484 $value = stripslashes($value); 485 } 486 if (function_exists('mysql_real_escape_string')) 487 { 488 $value = mysql_real_escape_string($value); 489 } 490 else 491 { 492 $value = mysql_escape_string($value); 493 } 494 return $value; 495 } 496 463 497 function pwg_query($query) 464 498 {
Note: See TracChangeset
for help on using the changeset viewer.