Article 5KD8H Session vars

Session vars

by
TBotNik
from LinuxQuestions.org on (#5KD8H)
All,

Hate to trouble you but have this code:

Code: session_name ( 'bizlist' );
session_start ( 'bizlist' );
$dbtst = tst_db ();Calling this function:

Code:function tst_db () {
$em_dir = "/mypath/EM/em_dio";
include_once ( "$em_dir/em_dio.php" );
define ( 'DB_USE', 'biz_track' );
$_SESSION ['DB'] = DB_USE;
define 'EM_DIR', "$em_dir" );
$_SESSION ['EM_DIR'] = $em_dir;
echo "ED=> $emdir SD=> $_SESSION ['EM_DIR'] !";
$edb = new em_dio();
$cont = $edb->dbConnect($_SESSION['DB']);
$tstdb = $edb->dbTest($_SESSION['DB']);
if ( $tstdb==1 ) {
echo "DB Connected and Ready! ";
return 1;
} else {
echo "Adding the DB!";
//'mysql -u $USER -pmypass' < 'deffile.sql';
//$dbtst = tst_db ();
return $dbtst;
} // end if mysql_num_rows
} // end function tst-dbbut somehow the $_SESSION vars are not being enabled. Sorry have forgotten the HOWTO troubleshoot this scenario, so all help appreciated!

This function is to test and make sure the MySQL DB exists and is enabled and if not add it to enable processing!

Thnx!

TBNKlatest?d=yIl2AUoC8zA latest?i=xw5qCMIDthU:xZwB4E8lQzI:F7zBnMy latest?i=xw5qCMIDthU:xZwB4E8lQzI:V_sGLiP latest?d=qj6IDK7rITs latest?i=xw5qCMIDthU:xZwB4E8lQzI:gIN9vFwxw5qCMIDthU
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments