Jump to content

Recommended Posts

I have an sql database that is updated via a PHP website. It is to track inventory. I can read from the DB and display the information and photos on the page. What I need is to be able to click on an item number of any listing on the page and pull up more info (ie photos) on another page of that listing. Kind of like a car dealership.

 

You search for a vehicle, and several vehicles are displayed. You click on the vehicle you want and are sent to a page with more information on the selected vehicle.

 

If any of this doesnt make sense, let me know.

Link to comment
https://forums.phpfreaks.com/topic/227881-inventory-database/
Share on other sites

What exactly are you having trouble with?  You put this in the MySQL section, I can move it to PHP if it's more than SQL help.

 

The pseudo design would look something like:

- Display all the results with links that contain the unique ID.

- When the user clicks the ID, send them to a page that handles inventory item details.

- Use the ID to query the database for that specific item and extract the appropriate information and display it.

 

Link to comment
https://forums.phpfreaks.com/topic/227881-inventory-database/#findComment-1175077
Share on other sites

Can you point me to make a link out of the unique ID and how to query a new page using that ID?

If you can:

I can read from the DB and display the information and photos on the page.

then displaying details for the specific item should be similar.  I assume you have these items in your database?

 

For your link, pass the value via HTTP:

itemDetail.php?id=5

then to extract the id in "itemDetail.php" you use $_GET:

echo $_GET['id'];

Now you should have enough information to extract all the information you need form the data base.

Link to comment
https://forums.phpfreaks.com/topic/227881-inventory-database/#findComment-1175117
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.