inkeol83 Posted October 15, 2008 Share Posted October 15, 2008 Hello, I would like to get some recommendation or advice on building my own website. My database contains example of below data. Person ------ UID FirstName LastName Info (Can contain multiple info on single person) ---- UID Person_UID(as foreign key) Information. Here is some description on what I want to do with my navigation. There will be menu/link from main page called "Person". It will link to a page with A to Z alpabet links. So when you click on 'A', it will retreive data of people's LastName starting with 'A'. I don't know whether I should build a different page for A, B, C... through to Z and how do I refresh the page with new data on the same page when <a href...>link</a> is clicked? I am familiar with form actioning to it self using PHP_SELF but not too familiar with single link. So summarizing in transactional term, Click on "People" will direct me to http://website.com/people.php from in index page. It will lists Alphabets using a loop with default data of random people. when someone clicks letter 'C' it will send sql query to database to look for... Select * from People where LastName (start with C). ... $UID = $result['UID']; $FirstName = $result['FirstName']; $LastName = $result['LastName']; and it will print out the on the same page. When someone named "Stephen Charlie" is clicked, it should send query to database looking for Select * from Info where PersonUID = (ID of a selected person) and display on a new page called person_info.php. I will do a mod-rewrite to make URL looks like http://website.com/person/Stephen-Charlie So what I am not sure is whether this is good way of building a page and how to show different data (when requested) on the same page. Link to comment https://forums.phpfreaks.com/topic/128620-phpmysql-general-question-on-my-case/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.