Hai,
My site was working well for the past few years by using php4 with mysql. But Now, our server upgraded the version php5. So, register globals is OFF default in php5. My data of session variables are not displayed. I used given below these code in page after the session start
<?php
session_start();
if (!ini_get('register_globals')) {
$superglobals = array($_SERVER, $_ENV,
$_FILES, $_COOKIE, $_POST, $_GET);
if (isset($_SESSION)) {
array_unshift($superglobals, $_SESSION);
}
foreach ($superglobals as $superglobal) {
extract($superglobal, EXTR_SKIP);
}
}
?>
Used these code the session varaibles are displayed. But how to display the chosen variables only. That is, In my webpage there are 5 fields there. Name, DOB,Location,Job,Image.
All the fileds are not required. That means Image and job not compulsory. The Image filed is upload from the image files. While I submit the data means I submitted data all means thats are displayed. But I doesn't submit the image field other that fields. Now also all the variables are taken in order. Anybody suggest me please.
My site was working well for the past few years by using php4 with mysql. But Now, our server upgraded the version php5. So, register globals is OFF default in php5. My data of session variables are not displayed. I used given below these code in page after the session start
<?php
session_start();
if (!ini_get('register_globals')) {
$superglobals = array($_SERVER, $_ENV,
$_FILES, $_COOKIE, $_POST, $_GET);
if (isset($_SESSION)) {
array_unshift($superglobals, $_SESSION);
}
foreach ($superglobals as $superglobal) {
extract($superglobal, EXTR_SKIP);
}
}
?>
Used these code the session varaibles are displayed. But how to display the chosen variables only. That is, In my webpage there are 5 fields there. Name, DOB,Location,Job,Image.
All the fileds are not required. That means Image and job not compulsory. The Image filed is upload from the image files. While I submit the data means I submitted data all means thats are displayed. But I doesn't submit the image field other that fields. Now also all the variables are taken in order. Anybody suggest me please.