Ok, I'm semi new at coding php. I can code many languages though and i understand the basics and can usually figure out things fairly easily.
My problem is thus,
I am trying to design a php page that will take a user id form the url , using the $GET_[id] etc... i want it to take the id, find it in the mysql database, and take certain columns from there. now i cannot get this to work at all. I want it to take name, a few other things and also get photo's from the id as well. would it be easier to have a seperate table in the same databse to store the picture id's or should it be in the user database. This is what i have so far it has been pieced together from my other code, etc. please help? lol cause i dont have the ph_filepath etc.. in my database yet but i cant even get it to display the owner even.
This is link
$id = $_GET["id"];
$sql = "SELECT * FROM users WHERE userid = '" . $id . "' ";
$filepath = "../photos/" . $row["ph_filepath"] . "/" . $row["ph_thumbnail"] . ".jpg" ;
$title = $row["ph_shorttitle"];
$owner = "© " . $row["first_name"] . " " . $row["last_name"];
$filenm = $row["ph_filename"];
$photoid = $row["ph_photoid"];
echo ("<TD VALIGN=TOP WIDTH=154><P><TABLE WIDTH=154 BORDER=0 CELLSPACING=0 CELLPADDING=0><TR><TD>");
echo ("<A HREF=\"../a1000/000_photolarge.php?filenm=$filenm&photoid=$photoid\"><IMG BORDER=0 SRC=\"$filepath\"
ALT=\"$title\"></A>");
echo ("</TD></TR></TABLE>");
echo ("<B><FONT SIZE=-1>$title<BR></FONT></B>");
echo ("<FONT SIZE=-2>$owner</FONT></TD>");