GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Tech Another php/sql question about categorizing rows (https://gfy.com/showthread.php?t=1355217)

Publisher Bucks 06-01-2022 11:46 AM

Another php/sql question about categorizing rows
 
Specifically, I'm wanting to add a 'bulk' categorizing section to my CRUD system and I'm thinking that using checkboxes may be the simplest way of doing this? My question is this, what would be the most simple (and secure) way of adding a bunch of predefined categories to a page and going through a list, clicking each checkbox that matches the rows data?

Should I also have another area in the CRUD that will allow me to add extra categries as the need arises or, just hardcode them in the edit.php page?

Any thoughts on this vs. any other options you might be able to suggest?

sarettah 06-01-2022 01:13 PM

Quote:

Originally Posted by Publisher Bucks (Post 23006870)
Specifically, I'm wanting to add a 'bulk' categorizing section to my CRUD system and I'm thinking that using checkboxes may be the simplest way of doing this? My question is this, what would be the most simple (and secure) way of adding a bunch of predefined categories to a page and going through a list, clicking each checkbox that matches the rows data?

Should I also have another area in the CRUD that will allow me to add extra categries as the need arises or, just hardcode them in the edit.php page?

Any thoughts on this vs. any other options you might be able to suggest?

You would probably be best to table your categories. Then have an add/change/delete screen for maintenance of the categories.

Then you can just loop through the categories table to make your checkbox screen.

Disclaimer: If you only have 1 or 2 categories then by all means hardcode them into the file but if you are going to have a fairly large list and expect to be adding to and changing them then what I said stands.


.

Publisher Bucks 06-01-2022 03:45 PM

Quote:

Originally Posted by sarettah (Post 23006915)
You would probably be best to table your categories. Then have an add/change/delete screen for maintenance of the categories.

Then you can just loop through the categories table to make your checkbox screen.

Disclaimer: If you only have 1 or 2 categories then by all means hardcode them into the file but if you are going to have a fairly large list and expect to be adding to and changing them then what I said stands.


.

Awesome, thank you!

machinegunkelly 06-02-2022 08:44 AM

I dunno what you're coding, but your questions make me wonder if you've considered using something like laravel ?

Most of your questions, are things this framework will easily take the difficulty out of.

k0nr4d 06-02-2022 09:45 AM

Quote:

Originally Posted by machinegunkelly (Post 23007227)
I dunno what you're coding, but your questions make me wonder if you've considered using something like laravel ?

Most of your questions, are things this framework will easily take the difficulty out of.

It's really better if he learn the fundamentals before using a framework. We've interviewed guys that only coded with frameworks and when you put them in front of 'real' PHP they freeze like a deer in front of headlights.

Publisher Bucks 06-02-2022 08:38 PM

Quote:

Originally Posted by k0nr4d (Post 23007241)
It's really better if he learn the fundamentals before using a framework. We've interviewed guys that only coded with frameworks and when you put them in front of 'real' PHP they freeze like a deer in front of headlights.

This.

I honestly I have only been playing with php for about 4-6 months, that’s why so many questions about errors and how-to do certain things.


All times are GMT -7. The time now is 06:24 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123