Buy Sell Discuss UK Domain Names at AcornDomains.co.uk Domain Monster Domain Name Registration

Today's Drop Dates are: 19-02-2012 or 26-02-2012   All times are GMT. The time now is 01:46:21 PM.
Domain Name Sales Domain Software Calculate UK Domain Drop Dates Domain Registration NameDrive Domain Parking Subscribe to our Domains For Sale newsletter
Go Back   Domain Forum Acorn Domains Buy Sell Auction UK Domains > Website Design and Promotion > Website Design
Connect with Facebook

Website Design Discuss web design

Closed Thread
 
LinkBack Thread Tools Display Modes
Old 31-08-2011, 01:24:55 PM     #1 (permalink)

 
Join Date: Jun 2011
Location: Cambridge
Posts: 579
chippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond repute

Dynamic pages php

Hi guys, Just trying to finish off the last bit of work on my sites just to add abit more to the site before they get sent elsewhere,

Basiclly hotel listings get pulled down off the mysql database table and displays a list of hotels and prices in that area, as seen at londonhoteloffers.org.uk/search.php at the moment tho the view details link is a link that points to that hotel on laterooms, but I would like to be able to be able to click that link and then it creates a dynamic page by pull the rest of the data row from the db of the hotel infomation on my site, I have looked around in row to do this and I kind of understand how its done I just cant find what im looking for on google, I thought I did but wasnt quite right, can anyone tell me what its called Im looking for or point me to a site or tutorial of what im trying to do,

Thank you for you time

Ryan
chippyb is online now  
Old 31-08-2011, 01:33:35 PM     #2 (permalink)

 
grantw's Avatar
 
Join Date: Mar 2005
Posts: 3,625
grantw has a reputation beyond reputegrantw has a reputation beyond reputegrantw has a reputation beyond reputegrantw has a reputation beyond reputegrantw has a reputation beyond reputegrantw has a reputation beyond reputegrantw has a reputation beyond reputegrantw has a reputation beyond reputegrantw has a reputation beyond reputegrantw has a reputation beyond reputegrantw has a reputation beyond repute

Change the link to:

yourdynamicpage.php?ID=12345

Where 12345 is the id number of the hotel from the database.

Then in yourdynamicpage.php use:

$hotelID = $_GET['ID']

You then use the $hotelID variable within the SQL query to bring back the data you need to build the page.

Grant
grantw is offline  
Old 31-08-2011, 01:33:43 PM     #3 (permalink)
dta

 
Join Date: Jul 2009
Posts: 388
dta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud ofdta has much to be proud of

if you already query the db to get the summary data from the row, you simply need to extend the query now to select the other columns you'd like to display and format your html accordingly to display the returned data.
dta is offline  
Old 31-08-2011, 01:46:08 PM     #4 (permalink)

 
Join Date: Jun 2011
Location: Cambridge
Posts: 579
chippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond repute

thanks for the reply, can you point me somewhere to where i can read up about this, or tell me what its called im looking for so i can search it myself, pref somewhere that has examples

thanks
chippyb is online now  
Old 31-08-2011, 01:57:47 PM     #5 (permalink)

 
Join Date: Jun 2011
Location: Cambridge
Posts: 579
chippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond repute

also where in the link you put 12345 instead would it be ['hotelid'] or ['ID']

thanks
chippyb is online now  
Old 31-08-2011, 02:19:49 PM     #6 (permalink)

 
grantw's Avatar
 
Join Date: Mar 2005
Posts: 3,625
grantw has a reputation beyond reputegrantw has a reputation beyond reputegrantw has a reputation beyond reputegrantw has a reputation beyond reputegrantw has a reputation beyond reputegrantw has a reputation beyond reputegrantw has a reputation beyond reputegrantw has a reputation beyond reputegrantw has a reputation beyond reputegrantw has a reputation beyond reputegrantw has a reputation beyond repute

Play around with it and work it out for yourself, I've just given you the basics of what you need to do.

Also, why have you opened two identical threads for this?? Please get admin to close one down.

Grant
grantw is offline  
Old 31-08-2011, 02:24:55 PM     #7 (permalink)

 
Skinner's Avatar
 
Join Date: Jul 2008
Location: Manchester
Posts: 2,507
Skinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond repute

If your using GET, for ANYTHING cleanse the data. For a number use is_numeric to verify someone isn't trying to inject anything.
__________________
Browse:
Skinner is offline  
Old 31-08-2011, 02:29:21 PM     #8 (permalink)

 
Join Date: Jun 2011
Location: Cambridge
Posts: 579
chippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond reputechippyb has a reputation beyond repute

i would rather not get little bits of info like this now i sort of know what im doing as it makes it harder to guess! that why im asking to point me somewhere that has a tutorial on this or info of what im after, or even just tell me what its called im looking for
Thanks
chippyb is online now  
Old 31-08-2011, 02:37:07 PM     #9 (permalink)

 
grantw's Avatar
 
Join Date: Mar 2005
Posts: 3,625
grantw has a reputation beyond reputegrantw has a reputation beyond reputegrantw has a reputation beyond reputegrantw has a reputation beyond reputegrantw has a reputation beyond reputegrantw has a reputation beyond reputegrantw has a reputation beyond reputegrantw has a reputation beyond reputegrantw has a reputation beyond reputegrantw has a reputation beyond reputegrantw has a reputation beyond repute

passing variable in url

passing variable between pages


or something similar
grantw is offline  
Old 31-08-2011, 02:47:36 PM     #10 (permalink)

 
newpbc's Avatar
 
Join Date: Feb 2010
Location: Wirral - UK
Posts: 994
newpbc has a reputation beyond reputenewpbc has a reputation beyond reputenewpbc has a reputation beyond reputenewpbc has a reputation beyond reputenewpbc has a reputation beyond reputenewpbc has a reputation beyond reputenewpbc has a reputation beyond reputenewpbc has a reputation beyond reputenewpbc has a reputation beyond reputenewpbc has a reputation beyond reputenewpbc has a reputation beyond repute

You want to do something like this with the ID as sugested
http://www.scottklarr.com/topic/91/p...-url-with-php/
All the time your spending on this mate you could be rewriting the laterooms content in wordpress
I know cron was a pain with your host but im sure one of the online solutions would have worked with less effort than this is going to be for you to get setup
__________________
Laterooms Wordpress Solution |
newpbc is offline  
Closed Thread



Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Domain Name Community Replies Last Post
Dynamic pages chippyb New Domainers 5 31-08-2011 02:30:11 PM
Yellow Pages buys 411.ca, ClearSky. - Montreal Gazette RSS Domain Name News 0 22-02-2010 04:59:11 PM

Domain Sponsor 2


All times are GMT. The time now is 01:46:21 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.6.0 RC 2
All content on Acorn Domains is member generated and is not moderated before posting. All content is viewed and used by you at your own risk and AD does not warrant the accuracy or reliability of any of the information. The views expressed are those of the individual contributors and not necessarily those of AD. Please contact us to report any issues or send a PM to "Admin".