millercj Posted March 29, 2008 Share Posted March 29, 2008 Hi everyone, I'm looking for a solution for a website and I'm not sure if php is the answer. I have a membership directory (about 200 contacts) online in a SQL database. I want to create some sort of interface for website users to view the directory but not have any options to make changes to anything. Any assistance you can offer would be fantastic Link to comment https://forums.phpfreaks.com/topic/98520-telephone-address-directory/ Share on other sites More sharing options...
AdRock Posted March 29, 2008 Share Posted March 29, 2008 You could echo all the details into a table using php Link to comment https://forums.phpfreaks.com/topic/98520-telephone-address-directory/#findComment-504182 Share on other sites More sharing options...
millercj Posted March 29, 2008 Author Share Posted March 29, 2008 thinking about something a little more interactive, with searches and sortable lists Link to comment https://forums.phpfreaks.com/topic/98520-telephone-address-directory/#findComment-504198 Share on other sites More sharing options...
slpctrl Posted March 29, 2008 Share Posted March 29, 2008 Something like this would do the trick I think. Syntax I hope is correct, I just whipped it up in notepad so meh <?php $con = mysql_connect("localhost","peter","abc123"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("my_db", $con); $result = mysql_query("SELECT * FROM person"); echo("<table border=1>\n <tr>\n <th>\n first name\n </th> <th>\n last name\n </th>\n </tr>\n"); while($row = mysql_fetch_array($result)) { echo("<tr>\n <td>$row['firstname']</td>\n <td>$row['lastname']</td>\n </tr>"); } echo("</table>"); mysql_close($con); ?> Well that would be your barebones directory anyway Link to comment https://forums.phpfreaks.com/topic/98520-telephone-address-directory/#findComment-504205 Share on other sites More sharing options...
AdRock Posted March 29, 2008 Share Posted March 29, 2008 If you want sortable columns have a look at www.codewalkers.com Link to comment https://forums.phpfreaks.com/topic/98520-telephone-address-directory/#findComment-504218 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.