Jump to content

PHP code for a link to a file which will receive the link's query and output...


kelseyirene

Recommended Posts

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.

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'];

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.