Error 200; A possible solution!

 
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions
View previous topic :: View next topic  
Author Message
sharkkiller
-


Joined: 27 Dec 2003
Posts: 8

PostPosted: Fri Jan 30, 2004 4:01 am    Post subject: Error 200; A possible solution! Reply with quote

I see on many reply in other post to change "register_globals" to On, but many says that it's already done and it doesn't work. So i'll say that a very small and hidden error in script can be the cause. Just look at that code and try to find the error (small and hidden error)

Code:
$DS = mysql_query("SELECT * FROM master WHERE Edition="DS");

echo "<table border='1'>\n";
echo "<caption>8ieme Édition</caption>\n";
echo "<TR>\n<TD>Nom</TD>\n<TD>Coût</TD>\n<TD>Type</TD>\n<TD>Rareté</TD>\n<TD>Couleur</TD>\n<TD>Texte</TD>\n<TD>P/T</TD>\n<TD>Artiste</TD>\n<TD>Nombre</TD>\n</TR>\n";

while ($ligne = mysql_fetch_object($DS))
{
 echo "<TR>\n<TD>$ligne->Name</TD>\n<TD>$ligne->Cost</TD>\n<TD>$ligne->Type</TD>\n<TD>$ligne->Rarity</TD>\n<TD>$ligne->Color</TD>\n<TD>$ligne->Text</TD>\n<TD>$ligne->P/T</TD>\n<TD>$ligne->Artist</TD>\n<TD>$ligne->Number</TD>\n</TR>\n";
}
echo "</table>\n";



Do you see the error?? Hum, not so easy to see. It's on the first line. At the end. Yes. $DS = mysql_query("SELECT * FROM master WHERE Edition="DS"); The error is Edition="DS" should be Edition='DS'". That small programing error = Error 200. So the only thing i would say is BE CAREFUL WITH SMALL AND HIDDEN PROGRAMING ERROR


Last edited by sharkkiller on Sat Jan 31, 2004 7:21 am; edited 2 times in total
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Fri Jan 30, 2004 6:19 am    Post subject: Reply with quote

Also be creafull with = sign's when adding HTML

A proper way
Code:

<img src=\"image.gif\">


Error 200
Code:

<img src="image.gif">

--------------------------------------------------------

Look it up , it should be in any PHP book you buy.
Back to top View user's profile Send private message Visit poster's website
sharkkiller
-


Joined: 27 Dec 2003
Posts: 8

PostPosted: Fri Jan 30, 2004 4:14 pm    Post subject: Reply with quote

Or use a single quote instead like:

Code:
<img src='image.gif'>


instead of (another good way but more longer and complexe to do)

Code:
<img src=\"image.gif\">


Last edited by sharkkiller on Sat Jan 31, 2004 7:21 am; edited 1 time in total
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Fri Jan 30, 2004 7:47 pm    Post subject: Reply with quote

I never tried that , thanks lol :D
Back to top View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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


Powered by phpBB phpBB Group