views:

87

answers:

3

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?>

Thanks.

+2  A: 

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 :

<?php
// php code here
// more php code here
?>
Pascal MARTIN
Good catch. We'll see whether that already solves it.
Pekka
Thanks ^^^ Yep, we'll see -- with a bit of luck, it will not be any harder than this :-)
Pascal MARTIN
Thanks but it didn't help.
Bill
A: 

Second take:

Try removing all white space between after the closing ?> and the start of your doctype and see whether that helps any.

Pekka
yes,100% certain PHP code is being interpreted. White space removed and here are the beginning lines of the code.<?php session_start(); if(!session_is_registered('Admin')) : header('Location: admin_Login.php'); endif; ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><!-- #BeginTemplate "index.dwt" --><head><!-- #BeginEditable "doctitle" -->The schema error is coming from the compatibility tool in MS Expression Web 3.0
Bill
A: 

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.

Bill