kelseyirene Posted December 12, 2009 Share Posted December 12, 2009 Hi, I know this will probably sound convoluted. (I couldn't think how to simplify, the subject, ugh, sorry!) I am working on a large library database. I'm using MySQL and have two tables: TitleInfo and AuthorInfo. I'm creating a page with the images of covers, which would be taken from MySQL information, and I was hoping to figure out a way that users could click on a cover and go to the title's page and have all the information on that page without having to create 100+ pages for each one. I'm sure there's a way to do it, but I can't find any information. I'm assuming by clicking the link going to the page, there would have to be a query sent to the universal page, say titles.php. And on this page there would be $title, $author_first, $author_last, $author_bio, $author_last.jpg ... I know how to pull all the respective information from the databases, just not sure how to make the page know what information to output when. I hope that makes sense! I'm teaching myself and it's slowgoing. Link to comment https://forums.phpfreaks.com/topic/184849-php-code-for-a-link-to-a-file-which-will-receive-the-links-query-and-output/ Share on other sites More sharing options...
dawsba Posted December 12, 2009 Share Posted December 12, 2009 sounds like you need to use GET on the link <a href="somthing.com">My Link IMG add &bookref=bookid changing bookid to the reference your can pull from the DB ie <a href="somthing.com&bookref=<?= $bookid; ?>">My Link IMG</a> and in your master page just call it by $bookref = $_POST['bookref']; Link to comment https://forums.phpfreaks.com/topic/184849-php-code-for-a-link-to-a-file-which-will-receive-the-links-query-and-output/#findComment-975798 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.