Im trying to call information from a database, the following code is inside a secure place when the members log in they should be able to see their own user details:
<?php
$hostname = "***********";
$username = "***********";
$password = "****";
if(!($link = mysql_connect("****", "****","****")))
die("Could not connect to database.");
$databasename = "mdb_am663";
if(!(mysql_select_db($databasename,$link)))
die("Could not open table.");
$member_id = $HTTP_GET_VARS['id'];
$strsql="SELECT email, firstname, surname, address_line1, ".
"address_line2, city_county, postcode FROM ".
"contacts WHERE id = '$member_id'";
if(!($rs= mysql_query($strsql, $link)))
die("Could not open table."); <<<<<<<<<<<<<<---------------------------------
//only one row should be returned
$row = @ mysql_fetch_array($rs);
// now complete the form
echo "t<input type=\"hidden\" name=\"email\" value=\"$row[email]\"><br>\n";
echo "<input type=\"hidden\" name=\"first_name\" value=\"$row[firstname]\"><br>\n";
echo "<input type=\"hidden\" name=\"last_name\" value=\"$row[surname]\"><br>\n";
echo "<input type=\"hidden\" name=\"address1\" value = \"$row[address_line1]\"><br>\n";
echo "<input type=\"hidden\" name=\"address2\" value = \"$row[address_line2]\"><br>\n";
echo "<input type=\"hidden\" name=\"city\" value=\"$row[city_county]\"><br>\n";
echo "<input type=\"hidden\" name=\"state\" value=\"$row[postcode]\"><br>\n";
?>
where i have indicated with a "<<<<<<<<<<<<<<---------------------------------" this is where it sql ends for some reason telling me: Could not open table.
anybody have any ideas?