feri_soft Posted April 30, 2006 Share Posted April 30, 2006 I have some files(about 20) for each category.I have a script to list the latest files and in the mysql table there is the catid.How to associate every catid with the correct file.If $categoryid = 1 for examplethe link to the tut must be cat1.php?view=4if category=2 the link must be cat2.php?view=70and so on...where $categoryid = $row[categoryid] is it correct?Can you help me writing this script? I need it very much,please! Quote Link to comment Share on other sites More sharing options...
Barand Posted April 30, 2006 Share Posted April 30, 2006 [code]switch ($categoryid) { case 1: $link = 'cat1.php?view=4'; break; case 2: $link = 'cat2.php?view=70'; break; //etc}[/code] Quote Link to comment Share on other sites More sharing options...
feri_soft Posted April 30, 2006 Author Share Posted April 30, 2006 But the tutorials are listed from a mysql database how to determine which gors for case 1 for case 2 etc?? 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.