I have two separate files--the first is photoalbum.php, which takes all of the pictures from the database and prints the thumbnails to the page. These thumbnails then link to getpic.php?picid=$a_row['id']. That page then calls up all the information with regards to that particular id and prints it to the page. The problem is that I can't get the query to work. My current query is:
$query = "SELECT url, DATE_FORMAT( datetaken, '%b %D, %Y' ) as dateofpic, event, family, place, photographer, blurb FROM photoalbum WHERE id=".$_GET['picid'];
I have tried several different iterations of this, such as:
$query = "SELECT url, DATE_FORMAT( datetaken, '%b %D, %Y' ) as dateofpic, event, family, place, photographer, blurb FROM photoalbum WHERE id=".$_GET['picid']."";
I have tried switching around which quotation marks I use. I have also tried using the old $HTTP_POST_VARS. Nothing works--I always get an error saying unexpected T_STRING or something else, depending on which iteration I've gone through.
Is there something I'm missing?