Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Feb 2012
    Posts
    7
    Member #
    30738
    I am a little rusty with php but I am quickly coming back to speed -although I just cant think of the best way to address one part of my website.
    I have a table of accommodations on the database previewed nicely on the accommodation page. I want the user to be able to click the image, name etc. and then be brought to a page dedicated to that link.
    Now I cant remember the best way to achieve this. Do I create a page for each accommodation (about 10) and put a link to it or is there some way I create a new php page which will accept the accommodation id and use that to pull everything off the database and create the page dynamically?

    I am totally blank on this - normally I can google my way out or find some old files from the past but it just didnt happen - although i have been working 13hours straight now
    thanks alot!

  2.  

  3. #2
    Senior Member Webzarus's Avatar
    Join Date
    May 2011
    Location
    South Carolina Coast
    Posts
    3,322
    Member #
    27709
    Liked
    770 times
    I don't do php, but asp is very similar...

    I would create the "list" page, and either make the image or have a "more details" link for each item in the list, send the record ID as a variable in the link that is passed to the "details page", on the details page, create your query for the DB where it accepts the record ID sent the the variable.

  4. #3
    Junior Member
    Join Date
    Feb 2012
    Posts
    7
    Member #
    30738
    thanks a million Webzarus!
    I spent the last hour tinkering and finally got it! I came here to update but you beat me to it and now I am certain it will work.
    Great! thanks alot for help


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 02:28 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com