php - incompatibility error - element is not allowed to be self closing in current schema
I had a html page that showed no incompatibility issues. I added some php code at the top for security purposes and now I get these following incompatibility issues due to the page now being a php page
This element is not allowed to be self-closing in the current schema. The schema is Internet Explorer 8.0. I tried removing the trailing "/" but it then said the empty element must have an end tag. I added and I get the error that it is an empty tag and cannot have a closing tag, it must have a closing slash. Looks like I came full circle.
This is just one example it occurs with all self closing elements. They are all fine when it is and html page. The pages still all function as designed and the php code I added is working perfectly. I am using MS Expression Web 3.0.
here is the php code,
<?php session_start(); if(!session_is_registered('Admin')) : header('Location: admin_Login.php'); endif; php?>
You are using "
php?>" as a closing PHP tag, which is wrong : it should be "
i.e. you're PHP code should look like this :
Try removing all white space between after the closing
?>and the start of your doctype and see whether that helps any.
Guys, thanks for the effort. I just found the problem and it is a user error. I needed to select XHTML 1.0 transitional as the XHTML compatibility standard. Sorry about that, but I do appreciate your help.