|
Author |
Message |
johnpend
Junior WebHelper
![Junior WebHelper Junior WebHelper](images/rank_1.gif)
Joined: 15 Mar 2004
Posts: 2
Location: California
|
Posted:
Mon Mar 15, 2004 7:59 pm (20 years, 3 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
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! |
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by johnpend Find all posts by johnpend](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) ![Visit Poster's Website Visit Poster's Website](templates/4WebHelp2/images/lang_english/icon_www.gif) ![MSN Messenger MSN Messenger](templates/4WebHelp2/images/lang_english/icon_msnm.gif) |
![](images/spacer.gif) |
Daniel
Team Member
![](images/rank_6.gif)
![](http://www.4webhelp.net/forums/images/daniel_avatar.php)
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Mon Mar 15, 2004 8:12 pm (20 years, 3 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
What is on line 56 of said file? ![Wink](/forums/images/smilies/icon_wink.gif) |
________________________________
![Image Image](http://www.4webhelp.net/images/daniel_sig.gif) |
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by Daniel Find all posts by Daniel](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) |
![](images/spacer.gif) |
OllieMaitland
Junior WebHelper
![Junior WebHelper Junior WebHelper](images/rank_1.gif)
Joined: 06 Dec 2003
Posts: 25
|
Posted:
Tue Mar 16, 2004 8:22 pm (20 years, 3 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
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 |
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by OllieMaitland Find all posts by OllieMaitland](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) ![Send email Send email](templates/4WebHelp2/images/lang_english/icon_email.gif) |
![](images/spacer.gif) |
johnpend
Junior WebHelper
![Junior WebHelper Junior WebHelper](images/rank_1.gif)
Joined: 15 Mar 2004
Posts: 2
Location: California
|
Posted:
Wed Mar 17, 2004 7:52 pm (20 years, 3 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
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! |
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by johnpend Find all posts by johnpend](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) ![Visit Poster's Website Visit Poster's Website](templates/4WebHelp2/images/lang_english/icon_www.gif) ![MSN Messenger MSN Messenger](templates/4WebHelp2/images/lang_english/icon_msnm.gif) |
![](images/spacer.gif) |
|
|
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.207013 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0
© 2001, 2002 phpBB Group :: Based on an FI Theme
| |