Jump to content

php+mysql


arianna

Recommended Posts

Hi;I have a product page , written by a PHP programmer and it connects to MYSQL DB.There is only one "admin login" to add new products but there are many products to be added. So as multiple users try to add new products , they try to login with the same username and password. Although the message "The new product is added successfully" is seen, no one see the product that he/she added.However if only one person logs in , the product is added and seen in the list.What should i do?Is it something to be done with PHP codes or Mysql?By the way i dont know about PHP and Mysql , but i wanna know.Thanks for reading this long , boring question. More than thanks if you reply.

Link to comment
Share on other sites

Chances are some users are trying ot add products at the same time and some are getting lost.This is probably due tot he way the PHP code was written. It is easy to make systems for a single user but it multi-user systems that pose a challenge.

Link to comment
Share on other sites

It might just be that they haven't refreshed the page, or that the product list page is getting cached. Try having two people log in, one of them makes changes, and then the second one refreshes the page they are looking at, and see if they see the changes then. If everything is using the same database, there's no reason why they shouldn't all see the same information, unless there is some code that associates products with a specific session, which would be pretty pointless.

Link to comment
Share on other sites

Thanks for your replies.It is not about refreshing , coz even they log out and log in back, the product doesnt exist in the list.Only one person can add a product at a time, others should be logged out.Sounds like a session problem,right?However there is no any "session expired" warning message , or anything like that.Why is it difficult to create multi-user system?Isnt there any document or sample to create such systems? Thanks again.

Link to comment
Share on other sites

Honestly, I can't think of any reason why this would happen other than some sort of race condition. If the software was programmed in a sane way, then I would think that anyone could log in and be assigned a session ID with their login info, they do whatever they do and interact with the database, and that's about it. I've never seen a system that would put public data in a database that only the user who added it could see, unless that is specifically a requirement. If you want me to take a look at it and can set me up with a username and password to log in and test things out, PM me with the info and I'll see if I can see anything wrong.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...