|
Author |
Message |
johnpend
Junior WebHelper
Joined: 15 Mar 2004
Posts: 2
Location: California
|
Posted:
Mon Mar 15, 2004 7:59 pm (20 years, 1 month ago) |
|
I have a site that is mostly PHP, but some of the pages don't load.
It reports a parse error on line 56, but give no further details.
<?php
$n = $HTTP_GET_VARS[ "n" ];
$mysql = mysql_connect( $hostname, $dbusername, $dbpasswd);
mysql_select_db( $databasename, $mysql );
$sql = "SELECT * FROM tblDictionary where DicStart = '" . 1D . "' order by DicName ASC";
?>
I'm quite new at PHP and woefully inadequate at figuring this out on my own.
Any assistance will be gratefully received. Thanks in advance! |
________________________________ I've fallen, and I can't get up! |
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Mon Mar 15, 2004 8:12 pm (20 years, 1 month ago) |
|
What is on line 56 of said file? |
________________________________
|
|
|
|
OllieMaitland
Junior WebHelper
Joined: 06 Dec 2003
Posts: 25
|
Posted:
Tue Mar 16, 2004 8:22 pm (20 years, 1 month ago) |
|
johnpend wrote: |
$sql = "SELECT * FROM tblDictionary where DicStart = '" . 1D . "' order by DicName ASC"; |
You need to have a variable in the ". xx ." part to $iD would work but if you just want to use the string $1D you should use :
Code: |
$sql = "SELECT * FROM tblDictionary where DicStart = '1D' order by DicName ASC";
|
OR if it is a variable then:
Code: |
$sql = "SELECT * FROM tblDictionary where DicStart = '". $1D ."' order by DicName ASC";
|
|
________________________________ http://dev.byng-designs.com <- Things I'm working on |
|
|
|
johnpend
Junior WebHelper
Joined: 15 Mar 2004
Posts: 2
Location: California
|
Posted:
Wed Mar 17, 2004 7:52 pm (20 years, 1 month ago) |
|
Thanks loads folks!
Line 56 is:
$sql = "SELECT * FROM tblDictionary where DicStart = '" . 1D . "' order by DicName ASC";
what puzzles me is that it occurs when a 404 occurs.
The site is a medical dictionary. this occours when browsing by alphabet. For example, if you click on "27", you get a page listing links to several interior pages, each containing a definition of a word that begins with the numerals 27. If you click on "2H", you get the message "Parse error: parse error in /home/httpd/books.md/html/2/2H.php on line 56" and there are in fact, no pages for anything beginning with "2H".
thanks again for the responses! I hope this info will help you further in sleuthing this out! |
________________________________ I've fallen, and I can't get up! |
|
|
|
|
|
You cannot post new topics in this forum. You cannot reply to topics in this forum. You cannot edit your posts in this forum. You cannot delete your posts in this forum. You cannot vote in polls in this forum.
|
Page generation time: 0.155336 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0
© 2001, 2002 phpBB Group :: Based on an FI Theme
| |