I have a Simple CMS i made but i cant anderstand how to connect the content to the category
i need another mysql table for cat?
how can i add this in to the form?
which functions will show the cat in the Add content page?
matanc244 0 Newbie Poster
Recommended Answers
Jump to PostShow your exisitng code, your description is unclear.
Jump to PostOk, I think I know what you want. I'd do this...
1) Create a new categories table in MySQL: cat_id [PK, int], category [varchar]
2) Run a SELECT query on a category table and extract both fields. In the while loop, you can build the select dropdown:
Jump to Postmeans you didn't run a query before the mysql_fetch_assoc
Jump to PostAs tintin shows, you need to include the connection ($dbc). I'm assuming this is set in your config.php file. Of course it may be called something other than $dbc. Just change the name of the variable in that case.
All 14 Replies

diafol
matanc244 0 Newbie Poster

diafol
matanc244 0 Newbie Poster

diafol
matanc244 0 Newbie Poster
NardCake 30 Posting Pro in Training
matanc244 0 Newbie Poster
NardCake 30 Posting Pro in Training
matanc244 0 Newbie Poster
Tinnin 8 Posting Whiz in Training

diafol
matanc244 0 Newbie Poster

diafol
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.