Done but with errors on page

how do i resolve "done but with errors on page"

I get this message on a few of my pages at www.mydomain.co.uk/books.php

I have pasted the code for this page below
<?php
// Connects to your Database 
mysql_connect("", "", "") or die(mysql_error()); 
mysql_select_db("a3587774_bidandp") or die(mysql_error()); 
 
// if no id is specified, list the available articles
if(!isset($_GET['id']))
{
   $self = $_SERVER['PHP_SELF'];
 
   $query = "SELECT id, title, description FROM booklist ORDER BY title";
   $results = mysql_query($query) or die('Error : ' . mysql_error()); 
 
   // create the article list 
   $description = '<ol>';
   while($row = mysql_fetch_array($results, MYSQL_NUM))
   {
      list($id, $title) = $row;
      $description .= "<li><a href=\"$self?id=$id\">$title</a></li>\r\n";
   }
 
   $description .= '</ol>';
 
   $title = 'eBooks';
} else {
   // get the article info from database
   $query = "SELECT title, description FROM booklist WHERE id=".$_GET['id'];
   $results = mysql_query($query) or die('Error : ' . mysql_error()); 
   $row = mysql_fetch_array($results, MYSQL_ASSOC); 
 
   $title = $row['title'];
   $desription = $row['desription'];
} 
 
 
?>
 
<?php
 
 
$cacheDir = dirname(__FILE__) . '/cache/';
 
if (isset($_GET['id'])) {
   $cacheFile = $cacheDir . '_' . $_GET['id'] . '.html';
} else {
   $cacheFile = $cacheDir . 'index.html';
} 
 
if (file_exists($cacheFile))
{
   header("Content-Type: text/html");
   readfile($cacheFile);
   exit;
}
 
// ... more code coming
 
if(!isset($_GET['id']))
{
   $self   = $_SERVER['PHP_SELF'];
 
   $query  = "SELECT id, title FROM booklist ORDER BY title";
   $results = mysql_query($query) or die('Error : ' . mysql_error()); 
 
   $description = '<ol>';
   while($row = mysql_fetch_array($results, MYSQL_NUM))
   {
      list($id, $title) = $row;
      $description .= "<li><a href=\"$self?id=$id\">$title</a></li>\r\n";
   }
 
   $description .= '</ol>';
 
   $title = 'ebooks';
} else {
   // get the article info from database
   $query  = "SELECT title, description FROM booklist WHERE id=".$_GET['id'];
   $results = mysql_query($query) or die('Error : ' . mysql_error()); 
   $row    = mysql_fetch_array($results, MYSQL_ASSOC); 
 
   $title = $row['title'];
   $description = $row['description'];
} 
 
// ... still more code coming
 
ob_start();
 
 
?>
 
 
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>eBooks | Bestsellers | all genres</title>
 
<meta name="description" content="sms competitions and reverse auction website where the lowest unique bid wins, special offers on pc and console computer games for all formats, win prizes via sms competitions or download games, ebooks, movies, mobile appllications and software as well as music and purchase concert tickets" />
<meta name="keywords" content="eBooks.com,ebook,ebooks,book,books,e-book,e-books,digital,electronic,download,retailer,bookstore,bookstores,shop,bookshop,bookshops,library,self,help,self-help,business,fiction,non-fiction,science,medical,novels" />
 
<link href="css/bidcss.css" rel="stylesheet" type="text/css" />
 
<style type="text/css">
<!--
a:link {
	text-decoration: none;
	color: #999999;
}
a:visited {
	text-decoration: none;
	color: #CCCCCC;
}
a:hover {
	text-decoration: none;
	color: #666666;
}
a:active {
	text-decoration: none;
}
-->
</style>
 
 
</head>
 
<body>
<div class="container">
<div class="body">
 
<div class="banner"><img src="siteconstruction/bidlogo2.png" alt="lowest unique bid wins" /></div>
 
<div class="date"><?php 
echo date('l, F dS Y.'); 
?></div>
 
<div class="affiliate"><a href="http://www.jdoqocy.com/ni70iqzwqyDHGMIHFJDLEKIIKF" target="_blank" onmouseover="window.status='http://www.ebooks.com';return true;" onmouseout="window.status=' ';return true;">
<img src="http://www.awltovhc.com/m970fz2rxvGKJPLKIMGOHNLLNI" alt="Download an eBook today" border="0"/></a></div>
 
<div class="divide"></div>
 
<div class="content">
  <div class="linkbar">
  <a href="http://www.mydomain.co.uk/tickets.php">TICKETS</a> |
  <a href="http://wwwmydomain.co.uk/dvd.php"> DVD </a>| 
  <a href="http://www.mydomain.co.uk/bluray.php">BLURAY</a> | 
  <a href="http://www.mydomain.co.uk/music.php">MUSIC</a> | 
  <a href="http://www.mydomain.co.uk/games.php">GAMES</a> | 
  <a href="http://www.mydomain.co.uk/mobile.php">MOBILE GAMES &amp; APPS</a> | 
  <a href="http://www.mydomain.co.uk/computing.php">COMPUTING</a> | 
  <a href="http://www.mydomain.co.uk/books.php">BOOKS</a> |
  <a href="http://www.mydomain.co.uk/holidays.php" target="_blank"> HOLIDAY SEARCH</a> | 
  <a href="http://www.mydomain.co.uk/index.php">HOME</a>
  </div>
 
<div class="bodytext">
  <div align="justify">Welcome to books @ mydomain.co.uk. We have some very interesting reads courtesy of ebooks.com and this month are featured must read is &quot;Barack Obama, the New Face of American politics&quot;. this is definately a must read for anyone YOU DON'T have to be interested in politics as this book covers much more than that! 
      <br />
<h3>biandplay featured books:</h3>	  
<a href="http://www.dpbolvw.net/99101iqzwqyDHHEMNFFDFEGMFJJF?url=http%3A%2F%2Fwww.ebooks.com%2Fcj.asp%3FIID%3D329150&cjsku=329150" target="_blank" onmouseover="window.status='http://www.ebooks.com';return true;" onmouseout="window.status=' ';return true;"><img src="http://us-preview.ebooks.com/previews/000/000329/000329150/000329150-sml-1.jpg" alt="Barack Obama, the New Face of American Politics" width="75" border="0" align="left"/></a>Reveals the political forces at work behind the charisma of rising Democratic star Barack Obama, in his message of inclusion and hope, in his campaigning, and in his work as a U.S. Senator from Illinois.
<img src="http://www.awltovhc.com/2g66xjnbhf04419A22021392662" width="1" height="1" border="0"/>
<br />
<br />
<br />
<br />
<br />
<h4>
Save 20% on any title  by Julie Garwood &amp; Joe Hildeman @
<a href="http://www.dpbolvw.net/click-3308911-10274976" target="_top"> eBooks.com</a></h4>
<img src="http://www.lduhtrp.net/image-3308911-10274976" width="1" height="1" border="0"/>
<br />
<a href="http://www.jdoqocy.com/4k104uoxuowBFEKGFDHBDCEKDHHD?url=http%3A%2F%2Fwww.ebooks.com%2Fcj.asp%3FIID%3D307471&cjsku=307471" target="_blank" onmouseover="window.status='http://www.ebooks.com';return true;" onmouseout="window.status=' ';return true;"><img src="http://us-preview.ebooks.com/previews/000/000307/000307471/000307471-sml-1.jpg" alt="Shadow Music" width="75" border="0" align="left"/></a>
<img src="http://www.tqlkg.com/ho70g04tzxIMLRNMKOIKJLRKOOK" width="1" height="1" border="0"/>
Throughout her acclaimed writing career, Julie Garwood has captivated readers with characters who are compelling, daring, and bursting with life. Now one of the most popular novelists of our time proudly returns to her beloved historical romance roots?in a thrilling tale of love, murder, adventure, and mystery set against the haunting landscape of medieval Scotland.
<br />
<br />
<br />
<br />
<a href="http://www.kqzyfj.com/nq72iqzwqyDHHEMNFFDFEGMFJJF?url=http%3A%2F%2Fwww.ebooks.com%2Fcj.asp%3FIID%3D260232&cjsku=260232" target="_blank" onmouseover="window.status='http://www.ebooks.com';return true;" onmouseout="window.status=' ';return true;"><img src="http://us-preview.ebooks.com/previews/000/000260/000260232/000260232-sml-1.jpg" alt="Camouflage" width="75" border="0" align="left"/></a>
<img src="http://www.ftjcfx.com/i8115xjnbhf04419A22021392662" width="1" height="1" border="0"/>
Two aliens have wandered Earth for centuries. The Changeling has survived by adapting the forms of many different organisms. The Chameleon destroys anything or anyone that threatens it. Now, a sunken relic that holds the key to their origins calls to them to take them home--but the Chameleon has decided there's only room for one.	  
 
<h2 align="center">
<?php echo $title; ?></h2>
<?php 
echo $description;
 
// when displaying an article show a link
// to see the article list
if(isset($_GET['id']))
{ 
?>
<p>&nbsp;</p>
<p align="center">
  <a href="<?php echo $_SERVER['PHP_SELF']; ?>">close</a></p>
<?php
}
?>
</div></div>
 
<div class="ad">
<div align="center">
<object>
<param name="movie" value="http://us-preview.ebooks.com/swf/ebooksPalmsBlack.swf?clickTAG=http%3A%2F%2Fwww.anrdoezrs.net%2Fclick-3284315-10522168%3Fsid%3Doptional%26url%3Dhttp%253A%2F%2Fwww.ebooks.com%2F"><embed src="http://us-preview.ebooks.com/swf/ebooksPalmsBlack.swf?clickTAG=http%3A%2F%2Fwww.anrdoezrs.net%2Fclick-3284315-10522168%3Fsid%3Doptional%26url%3Dhttp%253A%2F%2Fwww.ebooks.com%2F" quality="high" bgcolor="#FFFFFF" wmode="transparent"  width="200" height="145" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>
</object>
<img src="http://www.ftjcfx.com/image-3284315-10522168" width="1" height="1" border="0"/></div></div>
 
<div class="timeleft">The mydomain.co.uk reverse auction begins in
<script type="text/javascript">document.write(daysLeft);</script> days.</div>
 
<div class="textlink">Text 'wish' and your bid in pence to 82055 to win a Mac Book Pro &amp; PS3</div>
 
<div class="column">
<h3>Bestsellers</h3>
<p><a href="http://www.jdoqocy.com/oi121shqnhp487D986A4657D6AA6?url=http%3A%2F%2Fwww.ebooks.com%2Fcj.asp%3FIID%3D291785&cjsku=291785" target="_blank" onmouseover="window.status='http://www.ebooks.com';return true;" onmouseout="window.status=' ';return true;"><img src="http://us-preview.ebooks.com/previews/000/000291/000291785/000291785-sml-1.jpg" alt="New Moon" width="60" border="0" align="left"/></a>
    <img src="http://www.awltovhc.com/8998ltxlrpAEDJFECGACBDJCGGC" width="1" height="1" border="0"/>Legions of readers entranced by Twilight are hungry for more and they won't be disappointed. In New Moon, Stephenie Meyer delivers another irresistible combination of romance and suspense with a supernatural twist.
  <br />
    <br />
    <a href="http://www.tkqlhce.com/2k77p-85-7NRQWSRPTNPOQWPTTP?url=http%3A%2F%2Fwww.ebooks.com%2Fcj.asp%3FIID%3D183519&cjsku=183519" target="_blank" onmouseover="window.status='http://www.ebooks.com';return true;" onmouseout="window.status=' ';return true;"><img src="http://us-preview.ebooks.com/previews/000/000183/000183519/000183519-sml-1.jpg" alt="The Murder Game" width="60" border="0" align="left"/></a>
    <img src="http://www.ftjcfx.com/dt121p59y31NRQWSRPTNPOQWPTTP" width="1" height="1" border="0"/>THE MURDER GAME is a 70,000 word romantic mystery about a mystery   game designer whose game goes murderously wrong.</p>
<br />	
<p>Get 20% off theses categories use coupon code Categorysalecp at checkout.    </p>
    <ol>
      <li><a href="http://www.dpbolvw.net/tl68dlurlt8CBHDCAE8A9CGG9F9?url=http%3A%2F%2Fwww.ebooks.com%2Fcj.asp" target="_blank">Biography</a>
        <img src="http://www.awltovhc.com/n5101o26v0zKONTPOMQKMLOSSLRL" width="1" height="1" border="0"/></li>
		
      <li><a href="http://www.dpbolvw.net/j7115tenkem154A653719597798" target="_blank" onmouseover="window.status='http://www.ebooks.com';return true;"     onmouseout="window.status=' ';return true;">Drama</a>
        <img src="http://www.tqlkg.com/n870kpthnl6A9FBA8C6EAECCED" width="1" height="1" border="0"/>        </li>
		<li><a href="http://www.tkqlhce.com/fs105p-85-7NRQWSRPTNPORVVOUO?url=http%3A%2F%2Fwww.ebooks.com%2Fcj.asp">Family and Relationships</a>
        <img src="http://www.lduhtrp.net/8s75ltxlrpAEDJFECGACBEIIBHB" width="1" height="1" border="0"/></li>
<li><a href="http://www.anrdoezrs.net/hs97uoxuowBFEKGFDHBJFFCDFH" target="_blank" onmouseover="window.status='http://www.ebooks.com';return true;" onmouseout="window.status=' ';return true;">Suspense</a>
<img src="http://www.lduhtrp.net/e7102m-3sywHLKQMLJNHPLLIJLN" width="1" height="1" border="0"/></li>
    <li><a href="http://www.tkqlhce.com/rp83ft1zt0GKJPLKIMGOKKHMQO" target="_blank" onmouseover="window.status='http://www.ebooks.com';return true;" onmouseout="window.status=' ';return true;">Psychology and Psychiatry</a>
<img src="http://www.ftjcfx.com/id102nswkqo9DCIEDBF9HDDAFJH" width="1" height="1" border="0"/></li>
<br />
    </ol>
Go <a href="www.mydomain.co.uk/studying.php" target="_blank">here</a> for academic books!
    </div>
 
<div class="footer"><a href="http://www.jdoqocy.com/lg98zw41w3JNMSONLPJLKOLTRQQ" target="_blank">Links</a> | <a href="mailto:info@mydomain.co.uk">Contact Us</a> | <a href="http://www.mydomain.co.uk/terms.php">Privacy Policy </a>|<a href="http://en.wikipedia.org/wiki/Unique_bid_auction"> What Is Reverse Auction?</a> | <a href="http://www.mydomain.co.uk/terms.php">Terms
</a></div>
 
</div>
 
<div class="signup">Sign up for email and sms text alerts.
  <?php
 
// Connects to your Database 
mysql_connect("", "") or die(mysql_error()); 
mysql_select_db("") or die(mysql_error()); 
 
//This code runs if the form has been submitted
if (isset($_POST['submit'])) { 
 
//This makes sure they did not leave any fields blank
if (!$_POST['firstname'] | !$_POST['lastname'] | !$_POST['email'] | !$_POST['mobile'] ){
die('You did not complete all of the required fields');
}
 
// now we insert it into the database
$insert = "INSERT INTO signup (firstname, lastname, email, mobile)
VALUES ('".$_POST['firstname']."', '".$_POST['lastname']."', '".$_POST['email']."', '".$_POST['mobile']."')";
$add_member = mysql_query($insert);
?>
    
    
  <h3>Registered</h3>
  <p>Thank you, you have registered - you will now recieve free text and email alerts for new auctions, competitions and special offers</p>
  
<?php 
} 
else 
{ 
?>
  
  <?php
}
?> 
  
  <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
  <table border="0">
  <tr><td><span class="style6">Firstname*</span></td>
  <td>
  <input name="firstname" type="text" size="10" maxlength="40" />  </tr>
   <tr><td><span class="style6">Lastname*</span></td>
  <td>
  <input name="lastname" type="text" size="10" maxlength="40" />  </tr>
   <tr><td><span class="style6">email*</span></td>
  <td>
  <input name="email" type="text" size="10" maxlength="40" />  </tr>
   <tr><td><span class="style6">mobile*</span></td>
  <td>
  <input name="mobile" type="text" size="10" maxlength="20" />  </tr>
  <tr><td><span class="style6">I agree to the terms</span></td>
  <td>
  <input name="terms" type="checkbox" /></td></tr>
  <tr><th colspan=2><ol class="style6"><input type="submit" name="submit" value="Sign up"></ol></th></tr></table>
  </form>
  </div>
 
<div class="bodytext2">search for any title:
<form action="http://www.google.co.uk/cse" id="cse-search-box" target="_blank">
  <div>
    <input type="hidden" name="cx" value="partner-pub-4937814196550581:nzbd79pjwt9" />
    <input type="hidden" name="ie" value="ISO-8859-1" />
    <input type="text" name="q" size="20" />
    <input type="submit" name="sa" value="Search" />
  </div>
</form>
<script type="text/javascript" src="/cse/brand?form=cse-search-box&amp;lang=en"></script>
 
<br />
<div align="center">
<script type="text/javascript"><!--
google_ad_client = "pub-4937814196550581";
/* 120x240, created 2/8/09 */
google_ad_slot = "7700717296";
google_ad_width = 120;
google_ad_height = 240;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>
</div>
 
</div>
</div>
 
</body>
</html>

Open in new window

rafique12Asked:
Who is Participating?
 
Jason C. LevineNo oneCommented:
That's an IE error that usually means some javascript has gone wrong.  I STRONGLY urge you to get Firefox and the Firebug extension.  It's wonderful for troubleshooting stuff like this.  Here's what Firebug reports for you:

daysLeft is not defined
http://www.mydomain.co.uk/books.php
Line 109
<script type="text/javascript">document.write(daysLeft);</script> days.</div>

syntax error
http://error.000webhost.com/not_found.html
Line 1
[Break on this error] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML...TR/xhtml1/DTD/xhtml1-transitional.dtd">\n

The first error is pure javascript...a function is firing that is not defined.

The second error is a \n at the end of the DOCTYPE.  Remove it.
0
 
joaotorresCommented:
This message is about something going wrong client side, not on the server. You should check the page source on the browser, not the .php page on the server.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.