hansman Posted February 17, 2009 Share Posted February 17, 2009 Hello all, I am reading up on php and i had a question. I would like to create a company listing. Entering these companies into my database is no problem. How can i make each company have their own "static" page but it is dynamic. EX: www.example.com/companies/[company name] Currently im using a method that is searches by zip code, but my result is www.example.com/zip.php (zip.php takes the entered zip code as a variable, then pulls it from the db with the rest of the information) Is there any topic that i should be looking into to figure out how to do this? Thanks in advance for any help. Link to comment https://forums.phpfreaks.com/topic/145515-dynamic-pages/ Share on other sites More sharing options...
AV1611 Posted February 17, 2009 Share Posted February 17, 2009 Hello all, I am reading up on php and i had a question. I would like to create a company listing. Entering these companies into my database is no problem. How can i make each company have their own "static" page but it is dynamic. EX: www.example.com/companies/[company name] Currently im using a method that is searches by zip code, but my result is www.example.com/zip.php (zip.php takes the entered zip code as a variable, then pulls it from the db with the rest of the information) Is there any topic that i should be looking into to figure out how to do this? Thanks in advance for any help. I do this type of thing all the time index.php?page=1 index.php?page=2 etc... <?php if(isset($_REQUEST['page']) && $_REQUEST['page'] == '1'){ Put the first page here } elseif($_REQUEST['page'] == '2'){ Put the second page here } etc... Now you have one script that loads each page for each query. You can also put that just in the "content" <div> of the page, so the rest stays static. Link to comment https://forums.phpfreaks.com/topic/145515-dynamic-pages/#findComment-763991 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.