I'm a beginner at PHP, I've designed a couple of pages which place into my MySQL DB, in addition to retrieve. That one page always provides me with the 500 error, but my other PHP pages dont (Like the Place record). Running PHP 5.2, apache 2.2

<?php
$con = mysql_connect("localhost", "XXXX", "XXXX");
if (!$con) 
{
 die('Could not connect: ' . mysql_error());
 }
  mysql_select_db("equipment", $con);

$result = mysql_query("SELECT * FROM equipmentwanted");

while $row = mysql_fetch_array($result))
    {
echo $row['fname'] . " " . $row['lname'];
echo "<br />";
    }

mysql_close($con);

?>

Several things to check out:

1) Not checking for query failures:

$result = mysql_query("SELECT * FROM equipmentwanted") or die(mysql_error());
                                                      ^^^^^^^^^^^^^^^^^^^^^^
  mysql_select_db("equipment", $con) or die(mysql_error());
                                    ^^^^^^^^^^^^^^^^^^^^^^

2) Syntax error:

while $row = mysql_fetch_array($result))
      ^--- missing a (