Schlo_50 Posted November 29, 2007 Share Posted November 29, 2007 Hello everyone! Ok, so i have seen websites that have data stored in databases and when a link is clicked a template page is generated with the data instead of having a separate page for every single item associated with a user. The address bar when clicked will look something like this: http://www.blahblah.com/user/index.php?id=view&&1918373707 I have two flat file databases. One, categories with the structure --> username|catname|catid and the other content with the structure --> username|catid|date|text I need some code please that will make a link between the 'catid' in both databases and then do that URL thing above to link to a generated page (or template page) where i can then echo out all information. I will post the code to show you how i am producing the links that i want people to click. function displaytab(){ $lines = file("usertabs.txt"); foreach ($lines as $line) { $data = explode("|", $line); if (current($data) == $_SESSION['userName']) { $name = next($data); $catid = next($data); $date = next($data); $sitead = "http://localhost/books1/area/index.php"; $_SESSION['id'] = $id; ?> <link href="style.css" rel="stylesheet" type="text/css" /> <table width="237" background="images/tab.png" border="0" cellpadding="1" cellspacing="0" class="main"> <tr> <td width="58"><div align="left"><a href="?id=view&&<?php echo "$id";?>"><?php echo "$name"; ?></a></div></td> <td width="175" class="main"><div align="right"><a href="?id=display"><img src="../images/edit.png" width="25" height="25" border="0" /></a> <a href="?id=del"><img src="../images/del.png" width="25" height="25" border="0" /></a></div></td> </tr> </table> Any help? Thanks for anything posted! Quote Link to comment Share on other sites More sharing options...
Schlo_50 Posted November 29, 2007 Author Share Posted November 29, 2007 Anybody? ??? Quote Link to comment Share on other sites More sharing options...
Schlo_50 Posted November 29, 2007 Author Share Posted November 29, 2007 bump Quote Link to comment 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.