I keep getting an error message with this script. What seems to be the problem? PHP is very new to me, so I appreciate anyone who can help me! The database name, table name, username and password have all been replaced with dummies, FYI. <? //check for required query string variables if (!$_GET[id]) { header("Location:http://localhost/contact_menu.php"); exit; } else { //if form variables are present,start a session session_start(); } //check for validity of user if ($_SESSION[valid] != "yes") { header("Location:http://localhost/contact_menu.php"); exit; } //set up table and database names $db_name ="testDB"; $table_name ="my_contacts"; //connect to server and select database $connection = @mysql_connect("localhost","username","password") or die(mysql_error()); $db = @mysql_select_db($db_name,$connection) or die(mysql_error()); //build and issue query $chk_id = "SELECT id FROM $table_name WHERE id ='$_GET[id]'"; $chk_id_res = @mysql_query($chk_id,$connection) or die(mysql_error()); $chk_id_num = mysql_num_rows($chk_id_res); //check for valid results if ($chk_id_num !=1){ //if not valid,redirect to menu header("Location:http://localhost/contact_menu.php"); exit; } else { //if valid,get information $sql ="SELECT media_outlet, media_type, f_name, l_name, title, email, phone, cell, fax, notes FROM $table_name WHERE id ='$_GET[id]'"; $result = @mysql_query($sql,$connection) or die(mysql_error()); //get results for display while ($row =mysql_fetch_array($result)) { $media_outlet = $row['media_outlet']; $media_type = $row['media_type']; $f_name = $row['f_name']; $l_name = $row['l_name']; $title = $row['title']; $email = $row['email']; $phone = $row['phone']; $cell = $row['cell']; $fax = $row['fax']; $notes = $row['notes']; } } ?> <HTML> <HEAD> <TITLE>Media Database: Read-Only Contact Details</TITLE> </HEAD> <BODY> <h1>Media Database</h1> <h2>Contact Details for <? echo "$f_name $l_name"; ?></h2> <P><strong>Name & Media Information:</strong><br> <? echo "$f_name $l_name"; ?><br> <? echo "$title"; ?><br> <? echo "$media_outlet"; ?><br> <? echo "$media_type"; ?><br> <? echo "<a href=\"mailto:$email\">$email"; ?><br> <? echo "$phone"; ?><br> <? echo "$cell"; ?><br> <? echo "$notes"; ?><br></P> <p><a href="contact_menu.php">Return to Main Menu</a></p> </BODY> </HTML>