Jump to content

Waliser

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Everything posted by Waliser

  1. I did, but it might be that I am reading it wrongly. My standard pages start <? include("config.php"); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> The config is what I wrote in the prev post. I don't see that I am outputting anything prior to the session. I am most likely a bit slow here sorry. thanks
  2. Hello all, I have tried to fix this many a time before but never managed it. However now it is really annoying me as it clogs up my error file. <?php session_start(); session_register('sid'); if (isset($_SESSION['sid'])) { } else { $tmp = md5(microtime()); $_SESSION['sid']=$tmp; } $db_server = "server"; $db_name = "name"; $db_user = "user"; $db_passwort = "pw"; $db = @MYSQL_CONNECT($db_server,$db_user,$db_passwort) or die ("no connection please contact me"); $db_check = @MYSQL_SELECT_DB($db_name); ?> This little file is called from every page on my website and is causing this line to appear lots What is the correct way of setting the session i.e. how do I correctly start it at a given point and then keep it throughout? From my understandin in the older php versions I could have just used session_register('sid'); and didn't need the start (but if I did that then had error) while now I have just read that the session_register('sid') has been removed as of 5.4.0. Help would be muchly appreciated, I don't use php that often, just made my site work in the beginning and ignored this but it annoyed me the other day when I saw the size of the error file. thank you Waliser
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.