FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Browser Compatibility issues





pckid2
I'm not sure whether this actually has anything to do with the PHP in my site but oh well...

Anyway, I've been working on this site for ages called WiiPages. I've finally got it working but I only tested it in IE7 and Firefox Portable. In case you didn't realise it, it's designed to be used on a Nintendo Wii, and that uses it's own version of Opera. Anyway, I tried it on my Wii earlier and It turns out it doesn't display properly. I then told my friend about it and he tried it in Safari, which also doesn't work.

I can't work out what's wrong at all so I'll post the code of the main file (index.php is just an Iframe containing the main page, so the main page doesn't display properly in any browser unless you use the Iframe, it uses a background which is tiled, so it cuts it off at the edge).

The link to the website is http://www.wiipages.org and then you click the link to enter the Wii section of the site. Before that you just get the blog-style news page.

Index.php:

Code:
<body>
<p align = "center">
<iframe width = "919" height = "675" src = "WiiPages.php" frameborder = "0">
</p>
</body>


WiiPages.php (Main page):

Code:
<html>
<body background="images/WiiPagesTemplate.png">
<?php
// Connects to your Database
mysql_connect("localhost", "__________", "_____") or die(mysql_error());
mysql_select_db("__________") or die(mysql_error());

//checks cookies to make sure they are logged in
if(isset($_COOKIE['WiiPages']))
{
$username = $_COOKIE['WiiPages'];
$pass = $_COOKIE['WiiWii'];
$check = mysql_query("SELECT * FROM users WHERE username = '$username'")or die(mysql_error());
while($info = mysql_fetch_array( $check ))
{

//if the cookie has the wrong password, they are taken to the login page
if ($pass != $info['password'])
{ header("Location: login.php");
}

//otherwise they are shown the admin area
else
{
 ?>
 
 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<iframe width = "246" height = "161" src = "LogoutButton.php" frameborder = "0" scrolling = "no" name="slot1"></iframe>

<?php

$slots = mysql_query("SELECT * FROM slots WHERE username = '" . $username . "'")or die(mysql_error());
while($slotsarr = mysql_fetch_array( $slots ))
?>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <iframe width = "246" height = "161" src = "slot.php?slot=2" frameborder = "0" scrolling = "auto"></iframe>
 
    &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <iframe width = "246" height = "161" src = "slot.php?slot=3" frameborder = "0" scrolling = "auto"></iframe>
   
 <br><br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;
    <iframe width = "246" height = "161" src = "slot.php?slot=4" frameborder = "0" scrolling = "auto"></iframe>
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
   <iframe width = "246" height = "161" src = "Ad.php" frameborder = "0" scrolling = "no"> </iframe>
   
 &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <iframe width = "246" height = "161" src = "slot.php?slot=6" frameborder = "0" scrolling = "auto"></iframe>


<br><br><Br><BR> &nbsp;&nbsp;&nbsp;&nbsp;
    <iframe width = "246" height = "161" src = "slot.php?slot=7" frameborder = "0" scrolling = "auto"></iframe>


&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <iframe width = "246" height = "161" src = "slot.php?slot=8" frameborder = "0" scrolling = "auto"></iframe>


 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <iframe width = "246" height = "161" src = "slot.php?slot=9" frameborder = "0" scrolling = "auto"></iframe>

<?php
}

}
}

else

//if the cookie does not exist, they are taken to the login screen
{
?>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<iframe width = "246" height = "161" src = "LoginButton.php" frameborder = "0" scrolling = "no" name="slot1">
</iframe>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <iframe width = "246" height = "161" src = "RegisterButton.php" frameborder = "0" scrolling = "auto"></iframe>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <iframe width = "246" height = "161" src = "EmptySlot.php" frameborder = "0" scrolling = "no"></iframe>

<br><br><br><br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<iframe width = "246" height = "161" src = "EmptySlot.php" frameborder = "0" scrolling = "no">
</iframe>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <iframe width = "246" height = "161" src = "Ad.php" frameborder = "0" scrolling = "no"></iframe>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <iframe width = "246" height = "161" src = "EmptySlot.php" frameborder = "0" scrolling = "no"></iframe>

<br><br><br><br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<iframe width = "246" height = "161" src = "EmptySlot.php" frameborder = "0" scrolling = "no">
</iframe>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <iframe width = "246" height = "161" src = "EmptySlot.php" frameborder = "0" scrolling = "no"></iframe>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <iframe width = "246" height = "161" src = "EmptySlot.php" frameborder = "0" scrolling = "no"></iframe>
<?php
}
?>

</body>
</html>


Thanks for any help Wink
hexkid
HTML Validator
pckid2
AHH! Too confusing, I'm only a twelve year old, it said:

Quote:
No Character Encoding Found! Falling back to UTF-8. I was not able to extract a character encoding labeling from any of the valid sources for such information. Without encoding information it is impossible to reliably validate the document. I'm falling back to the "UTF-8" encoding and will attempt to perform the validation, but this is likely to fail for all non-trivial documents.

Read the FAQ entry on character encoding for more details and pointers on how to fix this problem with your document.

No DOCTYPE found! Attempting validation with HTML 4.01 Transitional. The DOCTYPE Declaration was not recognized or is missing. This probably means that the Formal Public Identifier contains a spelling error, or that the Declaration is not using correct syntax. Validation has been performed using a default "fallback" Document Type Definition that closely resembles "HTML 4.01 Transitional", but the document will not be Valid until you have corrected this problem with the DOCTYPE Declaration.

Learn how to add a doctype to your document from our FAQ.

This page is not Valid (no Doctype found)!
Below are the results of attempting to parse this document with an SGML parser.

Error Line 1 column 0: no document type declaration; implying "<!DOCTYPE HTML SYSTEM>".
<html>The checked page did not contain a document type ("DOCTYPE") declaration. The Validator has tried to validate with a fallback DTD, but this is quite likely to be incorrect and will generate a large number of incorrect error messages. It is highly recommended that you insert the proper DOCTYPE declaration in your document -- instructions for doing this are given above -- and it is necessary to have this declaration before the page can be declared to be valid.



Error Line 2 column 46: document type does not allow element "BODY" here.
<body background="images/WiiPagesTemplate.png">The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).



Error Line 23 column 6: end tag for "HTML" which is not finished.
</html>Most likely, You nested tags and closed them in the wrong order. For example <p><em>...</p> is not acceptable, as <em> must be closed before <p>. Acceptable nesting is: <p><em>...</em></p>

Another possibility is that you used an element which requires a child element that you did not include. Hence the parent element is "not finished", not complete. For instance, <head> generally requires a <title>, lists (ul, ol, dl) require list items (li, or dt, dd), and so on.


I have a much better knowledge of PHP than HTML and I can't see what's wrong.
hexkid
pckid2 wrote:
AHH! Too confusing
LOL

If it works in some browsers, but not in others, most likely your problem is with the HTML.
I suggest you ask in the Html, CSS and Javascript forum.
pckid2
Thanks, shall do!

To Moderator: could you please close this, I'll repost it in the HTML forum
mathiaus
pckid2 wrote:
To Moderator: could you please close this, I'll repost it in the HTML forum

http://www.frihost.com/forums/vt-64794.html
-close-
Related topics
*OFFICIAL* Which Browser do you use?
I need Flash menu
First XMLHttpRequest Object Project - A refreshless shoutbox
Book on CSS
Having browser compatibility issues
[RESOLVED] IE problem
Capturing user's data
Browser Compatibility issues
Old browser compatibility.
mecafee antivirus problem
[Guide] HTML and CSS
Keanetix - my portfolio and blog
Browser compatibility
JS: How do you manage Cross Browser Compatibility?
This topic is locked: you cannot edit posts or make replies.    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.