FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Internal Server Error





DanielXP
I keep getting a 500 with this

Code:
if(!isset($_GET['cat'])){
$query = mysql_query("SELECT * FROM tutorials_categorys") or die(mysql_error());
if(mysql_num_rows($query) == 0) {
echo "No tutorial categories currently!";
} else {
$color1 = "#e8eef7"; 

$color2 = "#FFFFFF"; 

$row_count = 0;
echo "<table width='550' border='0'>
  <tr>
    <td width='49%' bgcolor='#dddddd'>Category and Description </td>
    <td width='14%' bgcolor='#dddddd'># Tutorials</td>
    <td width='37%' bgcolor='#dddddd'>Latest Tutorial</td>
  </tr>";
while($row = mysql_fetch_array($query))
{
$row_color = ($row_count % 2) ? $color1 : $color2;
$id = $row[id];
$query = mysql_query("SELECT * FROM tutorials WHERE cat_id = '$id' AND is_validated = '1'") or die(mysql_error());
$nututs = mysql_num_rows($query);
echo "  <tr>
    <td bgcolor='$row_color'><b>$row[category]</b><br>$row[description]</td>
    <td bgcolor='$row_color'>$nututs</td>
    <td bgcolor='$row_color'>&nbsp;</td>
  </tr>";
$row_count++;
   }
echo "</table>";
}


Its some thing to do with the

Code:
$nututs = mysql_num_rows($query);


Becoz when i remove it theres no error can some one please help.
DanielXP
Can now one help me?
coreymanshack
jezz you have to give it time man... did you ever connect to the databse?
DanielXP
Ok time

And yer i did connect to DB
yjwong
What host are you trying to host this script with? This is probably a server-side configuration error. Does other scripts work fine? If other scripts work fine then you should try to check your script more carefully.
coreymanshack
hmm i'm not sure on this one... check the placement of your qoutes then..
krazycapital
500 is an internal server error. That would mean there's an error with Apache or your .htaccess
coreymanshack
ooo ooo yea... i got off topic with my thoughts... sry bout that...
Related topics
500 Internal Server Error
Internal Server Error
500 Internal Server Error!
Internal Server Error, what can I do?
500- Internal Server Error - DONT START NEW THREADS
Internal Server Error
500 Internal Server Error (please lock)
500 internal server error?
[help] 500 Internal Server Error server 1
Perl CGI 500 Internal Server Error
500 Internal Server Error
Internal Server Error
Internal Server Error in Joomla, Please help!
awstats is getting Internal Server Error
Internal Server Error
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.