steven1 wrote:Adjusted the var and placed it directly below session_start() and no go still. Page doesnt display it anywhere. I'm running out of ideas.
thanks for the help though.
edit: Quick question. Is it possiable that the issue is that index.php includes three html files (topper, content, footer) that all html is in these files. but I cant add this javascript to the topper in the head section becuase that returns that session was already started in index.php?
Sounds like you need to diagram what code needs to go where. Don't just stick things in when you think of them. Plan the entire script. Includes merely save you the trouble of typing everything into one script file. When it is executed, wherever you place an Include or Required statement, that's where the code is copied into the combined output. So start with a diagram of what it would have to look like if it were all in one file, no includes. Then you should be able to see where session_start() and initialization of variables need to be.
Beyond that, be sure you understand what each step of your script should do. Then figure out how to determine for sure whether that step is happening. If it's not, that will lead you back to the code that should have made it happen. This is what you have to do with every script, every time you do any coding. For example, you've determined that the javascript code isn't getting sent to the browser, right? Why not? Well, look at the code to see why not. Your PHP code says that the javascript should be echoed to the browser
if the value of a variable $info is True (that is, not zero or null). So if it's not happening, it's sprobably because $info is NOT True. To check, you could echo the value of $info so you could confirm what value it is (echo "The value of info is: ".$info;). So why isn't it True? You have to go further back and look at where you set its value, right? That's the process you have to follow.