Welcome Guest, Not a member yet? Register   Sign In
How to create Controller & view pages for each user?
#11

Or you can do as log message do
Reply
#12

I agree with the rest here. I suggest that you start to play with a database called MySQL through an interface called PHPMyAdmin. Tons of tutorials out there. Hopefully, you will be up and running very fast.
Reply
#13

(01-20-2020, 02:06 AM)muuucho Wrote: I agree with the rest here. I suggest that you start to play with a database called MySQL through an interface called PHPMyAdmin. Tons of tutorials out there. Hopefully, you will be up and running very fast.

I already use a database. I want a system that is simple.
Reply
#14

And generate 1000 controllers with hard coded user name is more simple than having a single controller with a parameter for the username? Did you know there is something called a variable that you can use with any value in it?  Tongue
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply
#15

(01-19-2020, 09:57 AM)christaliise Wrote:
(01-19-2020, 08:31 AM)includebeer Wrote:
(01-19-2020, 08:01 AM)christaliise Wrote: My system will have far more that 1,000 account files for all the users. But I just need to learn how to delete the last curly bracket } from the Controller each time an user registers.

No, you need to learn how to properly develop a web application.

If you continue with your idea of generating 1000 controllers for your 1000 users, you will end up with an unmaintainable mess that won't work half of the time. Start by creating something simple with a tutorial, then rewrite your current app the proper way, with a database.

Good luck!

@includebeer I like constructive criticism but comments like "need to learn how to properly develop a web application" - "you will end up with an unmaintainable mess" - "start by creating something simple with a tutorial" - "rewrite your current app the proper way" are not constructive. You could have been more elaborate in your comments which would be constructive.

As I've said using a database can be double handling when some information changes. For example if a user changes a street address, the old address will need to be transferred to a different field and with a date, so that the new address can be inserted. None of that mess would occur with a Controller & view page being created only once.

First of all, as you mention, you are expecting constructive criticism. But the funny thing is, you are replying in a destructive way. I will say that, still now, the best replay in this post is the first replay from @includebeer. But you are not accepting this. And yes, I will also say, learn first to develop with CI, understand first, what is CI.

The help you are asking for, I think it is not related with CI at all. This can be done by a simple PHP and HTML. Just create HTML file for each user. CI is for those who have the interest to learn this and want to build web app using the features of CI. It is for those who will try to use a single Controller for thousands or millions of user instead of thousands or millions Controllers for for each user.

Happy coding.
"Who thinks in code"
Perfectly describes who I am
mbparvez.me
Reply




Theme © iAndrew 2016 - Forum software by © MyBB