Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I am developing an application where it will be necessary that during registration the user who registers becomes the "admin" for their group and then has the ability to create sub users who they can manage.
I plan on creating a table with the following fields: unique id; username; password; role and group.
I am uncertain best method to enable that the original account is auto tagged as the admin and has the ability to both create groups and have the sub groups tied to it.
The original question got tagged as not being right for the forum -- but I am not looking for how to code and more so best process.
You could add a boolean field "group_admin" in the table where these users are stored to control if the user can or cannot create other users. If group_admin equals true (or 1) he is able to manage the group. Did that help you?
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
How can I protect PHPMYADMIN with password? I mean that whenever I will go to localhost/phpmyadmin it will ask for username and password, only after given the right username and password, it will allow the user to view all of the databases, tables and so on.
Thanks in advance!
PHPMyAdmin should ask for a user already, unless you somehow avoid the log in if you're on localhost.
Either way, from PHPMyAdmin you can create and edit users. Simply add a user to view the database with, and make sure there are no accounts that can see the database without a username and password.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I am trying to conditionally style user-to-user messages on my site based on the following:
If the user has not yet accessed the message, it remains bold ("unread").
If the user clicks the link and accesses it, it goes from bold to unbold ("read")
(reference: this is how many email inboxes work)
Question: How would I check if the user has clicked on the link to view their new message, or if they have not? As in, how would I store this information and indicate that it has been "read"?
Try adding a column to your messages' table (for example read) and set this column to 1 when the user has read his message?
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
I am fairly new to PHP but am in the process of hacking together a web app focused around gardening. I followed a tutorial and built a registration and login system. I want the user in the app to be able to input additional data at a later date including fields like Postcode/Zip code and the ability for them to select 'Plants' to add to their account. I know how I create the form but I want to know how to add this data to the database so that it corresponds with their account details such as username which are already in the database.
Hopefully you have a column in the users table called 'id' or something similar which auto increments and is unique, this gives you a point of reference for each user.
When the user logs in, using his username and password, you can retrieve this id, and then use it throughout your app when working with the table or other tables that are related (using the id).
So if you were to add/update information in the table you'd use the user's id eg:
UPDATE users SET postcode = 'sg12988' WHERE id = '8374'
You can read more about SQL commands here or here .
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions must demonstrate a minimal understanding of the problem being solved. Tell us what you've tried to do, why it didn't work, and how it should work. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have just started using opencart, but I'm good with moderate php. In opencart, the only way to add products currently is through the admin panel. I would like to let users have the option of adding products, without seeing any of the admin panel, like ebay without the auction or amazon. I tried looking at the database to see how it is organized, but there are WAY too many tables. Also, I can't locate the php script that inserts the new product information into the database. Does anyone have an extension or at least know how opencart inserts the product in the database?
Thanks for all the help and sorry for the paragraph.
The file you are looking for is /admin/model/catalog/product.php. You will see that there is a method called addProduct which you will have to replicate, remove anything that shouldn't be accessible and you'll also need to create the form for it too. For more info on the MVC, check out this answer
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I'm in the process of converting a CoreCommerce website into OpenCart.
CoreCommerce is a hosted e-commerce application.
I need to export customers, orders, products, categories, and reviews (or hopefully as much as I can). The corecommerce exported customer CSV file does not contain their passwords. Do you know how this will work out? Should I just create random passwords for each customer and email them and let them know? There are about 16000 customers.
Also, do you have any experience with any of the CSV import tools for OpenCart that you can recommend?
Thanks
Just ask your customers to reset passwords when they did not already and they try to log into your site.
I'd first inspect the CSV files then create a php function to import all correctly since i don't think both applications have the same database fields.