abushahin
11-22-2009, 03:25 PM
Hey jus wondered if anybody could spot an obvious mistake or if im doing something wrong as my page wont display on the opera browser its fine on all other browsers including windoze, im using v 9.62, the codes below:
<?php echo "<xml version=\"1.0\" encoding=\"UTF-8\"/>\n"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/tr/xhtml1/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Blogs ¦ Start Page</title>
<link rel='stylesheet' type='text/css' href='style.css' />
<!-- compliance patch for microsoft browsers -->
<!--[if lt IE 7]>
<link rel='stylesheet' type='text/css' href='multi-column-ie.css' />
<script src="/ie7/ie7-standard-p.js" type="text/javascript"></script>
<![endif]-->
</head>
<body>
<div id='header'>
<h1 style="text-align:center">Welcome To Your Blog</h1>
<div id="navcontainer">
<ul id="navlist" style="text-align:center">
<li><a href="index.html">Home</a></li>
<li><a href="login.php">Login</a></li>
<li><a href="register.php">Register</a></li>
<li><a href="#">Contact</a></li>
<li><a href="#">Links</a></li>
</ul>
</div>
</div>
<div id='container'>
<div id='first-column'>
</div>
<?php
require 'include.php';
//connect to SQL server
$conn = mysql_connect($dbHost, $dbUser, $dbPass) or die ('Error connecting to mysql');
mysql_select_db($dbName) or die('Error, cant find database');
$retrieveQuery = mysql_query("SELECT blog_Id, blog_Title, blog_Created_Datetime, user_Name, location
FROM blogs, users
WHERE blogs.user_Id = users.user_Id ORDER BY blog_Created_Datetime DESC;");
$num = mysql_num_rows($retrieveQuery);
if ($num > 0)
{
?>
<div id='content'>
<h2 style="text-align:center;text-decoration:underline;">Latest Blog Titles</h2>
<p style="text-align:center"><a href = "blogswithentry.php" style='color:#FF0000'>View blogs with entries</a></p>
<hr class="ee"/>
<?php
$i=0;
while ($i<$num) {
$blogtitle = mysql_result($retrieveQuery,$i,"blog_Title");
$blogid = mysql_result($retrieveQuery,$i,"blog_Id");
$date = mysql_result($retrieveQuery,$i,"blog_Created_Datetime");
$username = mysql_result($retrieveQuery,$i,"user_Name");
$location = mysql_result($retrieveQuery,$i,"location");
$NewDate = date("d M Y, H:i:s", strtotime($date));
?>
<p style="text-align:center;color:#CD580A">
<?php echo $blogtitle;?><br />
<?php echo "<b>By:</b> ".$username .", ". $location ." ". '<span style="font-size:x-small;color:#224433">('.$NewDate.')</span>'; ?><br />
<?php echo "<a href = blog_details.php?id=$blogid style='font-size:small;color:#FF0000'>View full blog and add comments</a>";?>
<hr class="ee"/></p>
<?php
$i++;
}
?>
<?php
}
else if ($num == 0)
{
echo "No Records Found<br />";
echo '<a href="register.php">Register to add blogs</a>';
}
?>
</div>
<div id='third-column'>
</div>
</div>
<div id='footer'>
<h6 style="text-align:center">Blogs 2009 © Abu Shahin</h6>
</div>
</body>
</html>
thanks in advance abu
abushahin (http://abushahin.eu)
smallroompictures (http://smallroompictures.com)
<?php echo "<xml version=\"1.0\" encoding=\"UTF-8\"/>\n"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/tr/xhtml1/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Blogs ¦ Start Page</title>
<link rel='stylesheet' type='text/css' href='style.css' />
<!-- compliance patch for microsoft browsers -->
<!--[if lt IE 7]>
<link rel='stylesheet' type='text/css' href='multi-column-ie.css' />
<script src="/ie7/ie7-standard-p.js" type="text/javascript"></script>
<![endif]-->
</head>
<body>
<div id='header'>
<h1 style="text-align:center">Welcome To Your Blog</h1>
<div id="navcontainer">
<ul id="navlist" style="text-align:center">
<li><a href="index.html">Home</a></li>
<li><a href="login.php">Login</a></li>
<li><a href="register.php">Register</a></li>
<li><a href="#">Contact</a></li>
<li><a href="#">Links</a></li>
</ul>
</div>
</div>
<div id='container'>
<div id='first-column'>
</div>
<?php
require 'include.php';
//connect to SQL server
$conn = mysql_connect($dbHost, $dbUser, $dbPass) or die ('Error connecting to mysql');
mysql_select_db($dbName) or die('Error, cant find database');
$retrieveQuery = mysql_query("SELECT blog_Id, blog_Title, blog_Created_Datetime, user_Name, location
FROM blogs, users
WHERE blogs.user_Id = users.user_Id ORDER BY blog_Created_Datetime DESC;");
$num = mysql_num_rows($retrieveQuery);
if ($num > 0)
{
?>
<div id='content'>
<h2 style="text-align:center;text-decoration:underline;">Latest Blog Titles</h2>
<p style="text-align:center"><a href = "blogswithentry.php" style='color:#FF0000'>View blogs with entries</a></p>
<hr class="ee"/>
<?php
$i=0;
while ($i<$num) {
$blogtitle = mysql_result($retrieveQuery,$i,"blog_Title");
$blogid = mysql_result($retrieveQuery,$i,"blog_Id");
$date = mysql_result($retrieveQuery,$i,"blog_Created_Datetime");
$username = mysql_result($retrieveQuery,$i,"user_Name");
$location = mysql_result($retrieveQuery,$i,"location");
$NewDate = date("d M Y, H:i:s", strtotime($date));
?>
<p style="text-align:center;color:#CD580A">
<?php echo $blogtitle;?><br />
<?php echo "<b>By:</b> ".$username .", ". $location ." ". '<span style="font-size:x-small;color:#224433">('.$NewDate.')</span>'; ?><br />
<?php echo "<a href = blog_details.php?id=$blogid style='font-size:small;color:#FF0000'>View full blog and add comments</a>";?>
<hr class="ee"/></p>
<?php
$i++;
}
?>
<?php
}
else if ($num == 0)
{
echo "No Records Found<br />";
echo '<a href="register.php">Register to add blogs</a>';
}
?>
</div>
<div id='third-column'>
</div>
</div>
<div id='footer'>
<h6 style="text-align:center">Blogs 2009 © Abu Shahin</h6>
</div>
</body>
</html>
thanks in advance abu
abushahin (http://abushahin.eu)
smallroompictures (http://smallroompictures.com)