Database Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesDatabase Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old March 13th, 2004, 05:00 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
getting parse error at very end of code?

Hi,
i'm using php to access postgres db, and im trying to get the page to retrieve some information from database. The code im using is as below.
I keep getting an error saying
Parse error: parse error in /home/path_name_etc/html/titleResults.php on line 81

When line 81 is the line after the code finishes, i.e. after the </html> end

Can anyone see what im doing wrong?
Thanks!


php Code:
Original - php Code
  1.  
  2. <html>
  3. <head>
  4. <title>Untitled Document</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  6. </head>
  7.  
  8. <body bgcolor="#ffffff" text="#000000">
  9. <table width="100%" border="0" bgcolor="" height="435">
  10.   <tr>
  11.     <td align="left" bgcolor="#ffffcc" height="47">
  12.       <p align="center"><font color="#003300" size="3"><b>University Of blah</b></font><font color="#003300" size="2"><b><br>
  13.         School Of blah</b></font><font color="#003300" size="3"></font></p>
  14.       </td>
  15.     <td height="47" valign="top" bgcolor="#ffffcc">
  16.       <div align="right"><font size="6" color="#003300"><b>Student blah</b></font></div>
  17.     </td>
  18.   </tr>
  19.   <tr valign="top">
  20.     <td width="20%" height="339"> <br>
  21.    
  22.       <?php include("menu.php"); ?>
  23.     <p>&nbsp;</p><p>&nbsp;</p></td>
  24.     <td width="100%" bgcolor="" height="339">
  25.       <p align="right">
  26.         <?php include("smallInclude.php"); ?>
  27.       </p>
  28.       <table width="98%" border="0" align="center" height="112">
  29.         <tr>
  30.           <td valign="top" height="315"><b><font size="2" color="#003300">The
  31.             following books have been returned for your search criteria "<?php echo $search; ?>"</font></b> <br><br>
  32.            
  33.           
  34.  
  35. <?php
  36.  
  37. include("connectBookdb.php");
  38.  
  39.  
  40. $query = pg_query("SELECT * FROM ts_module_books WHERE book_title LIKE '%$search%'");
  41. $row = 0;
  42. $numrows = pg_numrows($query);
  43.  
  44.  
  45. printf ("<table border=1>");
  46. printf ("<tr><td>Book Title</td><td>Author</td><td>Publisher</td></tr>");
  47.  
  48. do
  49. {
  50. $data = pg_fetch_row ($query, $row);
  51. printf ("<tr><td>%s</td><td>%s</td><td>%s</td></tr>", $data[0], $data[1], $data[2]);
  52. $row++;
  53. while ($row < $numrows);
  54. printf ("</table>");
  55.  
  56. ?>
  57.  
  58.  
  59.  
  60.             <br>
  61.            
  62.           </td>
  63.         </tr>
  64.        
  65.       </table>
  66.     </td>
  67.   </tr>
  68.   <tr valign="top">
  69.     <td colspan="2" ><br><hr>&nbsp;
  70.    
  71.      </td>
  72.    
  73.      
  74.       <table width="98%" border="0" align="center" height="112">
  75.       </table>
  76.    
  77.   </tr>
  78. </table>
  79. </body>
  80. </html>

Reply With Quote
  #2  
Old March 13th, 2004, 06:34 PM
honcho's Avatar
honcho honcho is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Cape Cod
Posts: 1,347 honcho User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 52 m 2 sec
Reputation Power: 3
RE: getting parse error at very end of code?

Parse errors that reportedly happen after the last line of a file usually indicate that you're missing a bracket somewhere futher up. IN this case, it looks like you don't close your do...while loop.

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesDatabase Help > getting parse error at very end of code?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway