Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

php/mysql- grabbing id from previous page

Options
  • 14-08-2008 10:23am
    #1
    Registered Users Posts: 788 ✭✭✭


    I have a page which displays the ranges in a particular category. The categories are in a table of their own on my database. Lets say for example the id for the category Music is 1. I'd have 'category.html?id=1'.
    On the category page there is then a seletion of the different ranges. The ranges also have a table of their own in the database and each indivudual range would use its individual id, example 'range.html?id=1&catid=1'

    On the range.html page it displays all the products in that range within the previous category. These can then be viewed individually in a 'product.html' page. Products have their own table in database. I want the link to be something like 'product.html?rangeid=1&prodid=27'.

    I hope what I'm trying to explain makes sense. My main issue is carrying all the id's from the previous page to the range.html or product.html pages :confused:


Comments

  • Closed Accounts Posts: 8,866 ✭✭✭Adam


    So it's the links themselves you're having trouble with?


  • Registered Users Posts: 788 ✭✭✭sleepyescapade


    No i can do those fine, my problem is displaying the correct ranges and products that are linked to the category/range/product ids in the links (i.e range.html?range=1&prodid=3).


  • Registered Users Posts: 14,761 ✭✭✭✭Winters


    Are you looking for help with some sort of php/mysql pagination script?

    To list X amount of items per page, from a certain category and browse through them?


  • Registered Users Posts: 3,594 ✭✭✭forbairt


    megcork wrote: »
    No i can do those fine, my problem is displaying the correct ranges and products that are linked to the category/range/product ids in the links (i.e range.html?range=1&prodid=3).

    I assume you've got a table linking the category and the range together ?
    categoryID,rangeID
    or something like that to link the two ?

    so if you know the range select the category of that range ?


  • Registered Users Posts: 788 ✭✭✭sleepyescapade


    Thanks guys for your help, apologies I didn't have time to post back but got this sorted in the end :)


  • Advertisement
Advertisement