dadoonan Posted April 8, 2006 Share Posted April 8, 2006 I'm having trouble getting the correct results on a list page. The query on the first page is pulling the name of active authors from the d/b and linking to a list page that is supposed to return essay titles by the requested author. The list page however is not returning any results.The Author.ID, which is showing up in the URL, is being passed from the first page to the list page (http://localhost/Der/writings/author.php?ID=5) but the list page is not accepting that variable.This is my first php site. Sorry for so basic a question.---------------------List page query =mysql_select_db($database_connDer, $connDer);$recordID = $_GET['recordID'];$query_GetAuthorList = "SELECT Writings.Writings_Author, Writings.Writings_Title, DATE_FORMAT(Writings_Date, '%M %D, %Y') as Writings_Date, Writings.Writings_Text, Writings.ID, Author.Autholr_Name, Author.ID FROM Writings, Author WHERE Author.Autholr_Name = Writings.Writings_Author and Author.ID = '$recordID'ORDER BY Writings.Writings_Date desc";$GetAuthorList = mysql_query($query_GetAuthorList, $connDerbyTrail) or die(mysql_error());$row_GetAuthorList = mysql_fetch_assoc($GetAuthorList);$totalRows_GetAuthorList = mysql_num_rows($GetAuthorList);david Quote Link to comment Share on other sites More sharing options...
earl_dc10 Posted April 8, 2006 Share Posted April 8, 2006 [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--] (http://localhost/Der/writings/author.php?ID=5) but the list page is not accepting that variable.[/quote]if that is the exact URL (at least the ID=5 part) instead of[code]$recordID = $_GET['recordID'];[/code]You'll want[code]$recordID = $_GET['ID'];[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.