essential Posted July 18, 2006 Share Posted July 18, 2006 Hi Guys and Girl’sI need some help, I use Dreamweaver MX 2004, have managed to build a partial site, using PHP /Mysql all talking to each other and can view live data, so that side is fine Here is where I need helpI have s series of occupations listed and I want to have a viewer see these occupations and click (standard Hyperlink) which will go to the data base and load up a webpage.The current site is based on 10+ individual web pages now want to streamline it.So here goes with a semi visual explanation of what I am looking forPage 1 (Index page) Occupation (hyperlink)I need to know the URL to put on this link which will go to database collect information and place into a webpage (page 2) occupation.php that is already set up as an occupation template i.e. have placed <?php echo $row_Recordset1['occupation_1']; ?> in the required places to build the page.Database base name is services and table is called jobSearchI assumed that all I would need to do was the following[b]http://www.mydomain.com/services/jobsearch=id2[/b] (is this correct? what I can not work out is how do you put the data onto webpage (page 2)Sorry if this goes on a bit but wanted to get it all in one go Essential Quote Link to comment https://forums.phpfreaks.com/topic/14928-call-database-to-load-page/ Share on other sites More sharing options...
moberemk Posted July 18, 2006 Share Posted July 18, 2006 You need to create another page with a recordset that uses a URL parameter to figure out which record to pull. When you make the occupation page, create a recordset that has the URL Parameter filter set to pull the right information based on what you passed in your url from the first page (you set that up in the bottom two input boxes).On the first page, you just need to select the link, and click the URL folder icon. From there, select occupation.php, and look below. You'll see a little lightning icon-that's to add dynamic parameters to the page (assuming that you're using a recordset-created list of occupations) based on the id. That will create the url occupations.php?id=(ID variable here). You can also use that to input static data, if you wish. Quote Link to comment https://forums.phpfreaks.com/topic/14928-call-database-to-load-page/#findComment-59899 Share on other sites More sharing options...
essential Posted July 19, 2006 Author Share Posted July 19, 2006 Hi moberemk Many thanks for your prompt help.Thank you very much I now have it to work, well almostI have redesigned the links so as they are dynamic pulled from the database, have binded them to the id tag, and when click it loads the first page. FantasticGuess what happens when I click the second link? Nothing well that's not true page one opens up in fact when I click on all links all I get is page one?Almost there? Quote Link to comment https://forums.phpfreaks.com/topic/14928-call-database-to-load-page/#findComment-60410 Share on other sites More sharing options...
moberemk Posted July 19, 2006 Share Posted July 19, 2006 Again, on the page, in the recordset field, you need to select to use a URL parameter for more then the first page to come up. Quote Link to comment https://forums.phpfreaks.com/topic/14928-call-database-to-load-page/#findComment-60414 Share on other sites More sharing options...
essential Posted July 21, 2006 Author Share Posted July 21, 2006 Now working in full thanks for your help, I have listed the final Recoredset below incase it can help others<?php do { ?> <li> <a href="suppliers.php?autonumber=<?php echo $row_reSuppliers['autonumber']; ?>"> <?php echo $row_reSuppliers['coName']; ?> <?php } while ($row_reSuppliers = mysql_fetch_assoc($reSuppliers)); ?></a></li> </ul> Quote Link to comment https://forums.phpfreaks.com/topic/14928-call-database-to-load-page/#findComment-61803 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.