0

Hello,

I am loking for a concept to geting started is there a way of creating a notification like on user end any one updates his post update or upload an image then on admin panel it notifies the admin like on menu bar it shows 1 and when the admin click on it it becomes 0 i know it is a tricky part i will get started but i want to get a guidline from experts here. I was thinking to create a count query and put a table of pending or something so when ever a user uploads an image and it will be approved by the admin
so how about this

$count = mysqli_query($connection, "SELECT * FROM table_name WHERE status='pending'" AND WHERE userid='1');

$result = mysqli_num_rows($count);

echo $result;

How is this approch is it user friendly??

2
Contributors
5
Replies
24
Views
2 Years
Discussion Span
Last Post by jkon
0

It would be great if you first explained what you are trying to do and then describe of how you are thinking to do it. As I understood you want admin to be notified when a user upload an image , is that so ?

0

This is the correct way so the admin would be able to know when the user have uploaded a photo or a file let supose so the notification should be sent to admin

0

@jkon

I have tried to create an admin panel where admin can upload files for users to work on and on user panel side user will be seeing a notification message like new file uploaded so then user can go to the files page and can download the file from theer and then work on it et.

When done user have the ability to upload that file and mark status as completed when status is marked as completed a notification will be sent to the admin panel showing that the file has been completed nad uploaded so from there tha admin can get his file back make sense ?

0

Hello UK-1991,
There many ways you can implement such functionalities here is just one of them. First lets talk a bit what means “upload an Image” and how we can create an abstraction layer to that. There are two main different approaches to that (in my point of view) one is to insert that image blob into the db and the second a mixed at least one repository db table with id and file info (extension , sizes or / and widths heights for images , original names , reference id , md5 of the blob or what ever) , a repository folder where you save the image (e.g. by its main repository table id) and PHP tier where you just serve the image making what ever authentications you need. I am strongly pro the second choice.

If you create that abstraction layer then added one , two or as many tables needed giving authorities and status to a specific image linking it with a user id is the easy part.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.