Hello, Thanks for you reply. Following code is in login.php
session_start();
session_register('sess_name');
session_register('sess_prog');
session_register('sess_part');
$sess_name = $name;
$sess_prog = $prog;
$'sess_part'= $'sess_part';
I'm calling a form bsc.php from this login.php :
// bsc.php : following is the excert of the bsc.php coding.
<?php
session_start();
print($sess_name);
print($sess_prog);
print($sess_part); // these does print the correct value for me.
..... few more code over here......
// user defined funciton
function bld_tbl($tblName, $semVal, $chbName){
print($sess_prog);
print($sess_part);
print("at function start");
$modStmt = "select mod_id, title, mod_wt from modid_titles_2002_2003 where prog = \"$sess_prog\" and part = \"$sess_part\" and semester = \"$semVal\" ";
print($modStmt);
..... few more coding here .....
}
The problem is, when printed or used the session variables in funciton, it doesn't have any value in it !!!, though it does have the correct value out side the function.
?>