Re: Very simple problem
Posted: Thu Nov 25, 2010 9:41 am
McInfo wrote:When you include a file, PHP will consider the contents parseable, regardless of the file extension. An installation of PHP that has the short_open_tag option enabled will see the "<?" of the "<?xml" tag in the XHTML file and enter PHP mode. It thinks the first token "xml" might be function, but when the next token is "version" instead of the expected "(", it can't make sense of what it thought was PHP code and dies with a parse error.hapazoid wrote:At the top of the two files that can be included was some html header stuff like doctype and xml version.
One solution is to echo the "<?xml" tag with PHP. Another solution is to disable short_open_tag.
Language constructs like isset and function names are not case-sensitive. Lowercase is merely a style concern.Pazuzu156 wrote:From what I have learned in php isset shouldn't be IsSet.Again, style.Pazuzu156 wrote:Instead of: include 'my.php'; Use: include("my.php");$_SESSION['userName'] is a variable just like $username would be. I see no need for an alias.Pazuzu156 wrote:is userName a variable? of so, have userName set: $username = $_SESSION['username']; and in the if: if(isset($_SESSION['username']))
Well, in being a php noob, I try to use every method I can so I can learn better. But thanks for that, It's something I can learn from.