Jump to content

Archived

This topic is now archived and is closed to further replies.

feri_soft

if help please

Recommended Posts

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 example
the link to the tut must be cat1.php?view=4
if category=2
the link must be cat2.php?view=70
and so on...
where $categoryid = $row[categoryid] is it correct?

Can you help me writing this script? I need it very much,please!

Share this post


Link to post
Share on other sites
[code]switch ($categoryid) {

     case 1:
                 $link = 'cat1.php?view=4';
                 break;

     case  2:
                $link = 'cat2.php?view=70';
                break;


     //etc
}[/code]

Share this post


Link to post
Share on other sites
But the tutorials are listed from a mysql database how to determine which gors for case 1 for case 2 etc??

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.