Jump to content

Search the Community

Showing results for tags 'Session $_Session'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 1 result

  1. IChaps

    Session Query

    Hello. I'd just like to enquire about using session S_session please. I've created 4 sessions to hold the log in data for the access to a database (host, username, password, database name) At present I've got it to load this data from a file and insert it into a session. Then for my use I've got it to display this data, to ensure it's reading from the file - which it is doing correctly. The problem I've got is in another php file. In the other php file the sessions are all blank and I don't know why this is. ---- In my index.php file the code reads [this works]:- //ReadFile $fp = fopen( dirname(__FILE__).'/Core/sys/dbinfo.txt', 'r' ) or die("Couldn't open file:- 1"); $db_host = fgets($fp); $db_user = fgets($fp); $db_pass = fgets($fp); $db_databasename = fgets($fp); fclose( $fp ); $_SESSION['dbf_host'] = $db_host; $_SESSION['dbf_user'] = $db_user; $_SESSION['dbf_pass'] = $db_pass; $_SESSION['dbf_databasename'] = $db_databasename; and in the other php file, the code reads:- session_start(); echo "new php file\n"; echo $_SESSION['dbf_host']; echo $_SESSION['dbf_user']; echo $_SESSION['dbf_pass']; echo $_SESSION['dbf_databasename']; The above code produces a blank screen. Could anyone please advise me? Thank You.
×
×
  • Create New...