Originally posted by Bunkermaster
can you paste your table definition so we can have a look at the table name and the fileds available?
Is your $cat a field or is it a variable? If a variable I am curious to see your table definition.
Don't worry you are in the right forum, you have many gurus around here 🙂 (I am a spam guru)
Table defenitions? If I export the table using phpmyadmin I get this, is that what you where looking for?
CREATE TABLE categories (
Dining varchar(100) NULL default '',
Go shoping varchar(100) NULL default '',
Things to do varchar(100) NULL default ''
) TYPE=MyISAM;
INSERT INTO categories VALUES ('Hotels and resturants', 'Sports equipment', 'Cinema');
INSERT INTO categories VALUES ('Motels with diners', 'Communication-equippment', 'Theme parks');
INSERT INTO categories VALUES ('', 'Books and paper', 'Sports arenas');
The table isn't identical to the one I use, it's just a bad translation, but the idea is the same.
$cat is a variable defined by the menu. The link for "Go shopping" is for instance "index.php?cat=Go shoping".
I know I shouldn't do it that way, but I just need to get things to work, I'll deal with perfecting the code later 🙂
When it comes to the "categories"-table I add the columns manually based on what's in the menu.
You ask alot about the "field", lets just make sure that our terminology matches. The field is where columns and rows intersept?