magic_quotes_gpc(runtime, sybase)
Posted: Fri Sep 03, 2010 12:08 pm
Hi everyone.
Since im using wamp server on my windows pc and i have access to php.ini default values for magic_quotes_gpc, magic_quotes_runtime, magic_quotes_sybase are set to off, which i can change, can anyone tell me what should i keep in mind while processing a form on another server?
Curently im checking for magic_quotes_gpc, should i check for runtime and sybase also?
Thanks.
Since im using wamp server on my windows pc and i have access to php.ini default values for magic_quotes_gpc, magic_quotes_runtime, magic_quotes_sybase are set to off, which i can change, can anyone tell me what should i keep in mind while processing a form on another server?
Curently im checking for magic_quotes_gpc, should i check for runtime and sybase also?
Code: Select all
if(($_SERVER['REQUEST_METHOD'] == 'POST') && ($action = "newuser")) {
if(isset($_POST['register'])) {
if(!get_magic_quotes_gpc()) {
$_SESSION['username'] = addslashes($_POST['username']);
$_SESSION['password'] = sha1(addslashes($_POST['password1']));
$_SESSION['email'] = addslashes($_POST['email1']);
$_SESSION['location'] = addslashes($_POST['location']);
$_SESSION['sex'] = addslashes($_POST['sex']);
$_SESSION['age'] = addslashes($_POST['age']);
}
else {
$_SESSION['username'] = $_POST['username'];
$_SESSION['password'] = sha1($_POST['password1']);
$_SESSION['email'] = $_POST['email1'];
$_SESSION['sex'] = $_POST['sex'];
$_SESSION['age'] = $_POST['age'];
}