MichaelHooker
Programmer
I have a website which needs to display photos to site visitors based on their selection from a table in my MySQL database, via a PHP form. I do not want them to have to provide a username and password to do this, the complication of a registration system is totally unnecessary. All the guidance I've read is based on setting up access privileges for named individuals and I can find no example of what I want to do.
Can someone please tell me if what follows is the right approach? The only option I can see is to grant select privileges to a generic user, say "Webuser", at the hostname where my database is located by my website provider with a generic password, say "Password":
The PHP form then feeds these details in when the query is submitted so that a connection for the user is established and his query processed.
Will this work OK if two users with apparently the same ID send a query at the same time?
I've programmed in Delphi for a long time, used dBase and other engines, but all my database work has been single-user only and I've never had to worry about permissions before, so this is new to me and I'm having trouble adjusting. My website currently works with a csv file which an Activex built-in to Internet Explorer processes on the user's PC with DHTML - but of course that only works in Internet Explorer, and the csv has grown to the point where the download to the user's PC takes too long for comfort.
Thanks in advance
Michael Hooker
Can someone please tell me if what follows is the right approach? The only option I can see is to grant select privileges to a generic user, say "Webuser", at the hostname where my database is located by my website provider with a generic password, say "Password":
Code:
GRANT SELECT ON db_name.table_name TO Webuser@host_name IDENTIFIED BY 'Password';
Will this work OK if two users with apparently the same ID send a query at the same time?
I've programmed in Delphi for a long time, used dBase and other engines, but all my database work has been single-user only and I've never had to worry about permissions before, so this is new to me and I'm having trouble adjusting. My website currently works with a csv file which an Activex built-in to Internet Explorer processes on the user's PC with DHTML - but of course that only works in Internet Explorer, and the csv has grown to the point where the download to the user's PC takes too long for comfort.
Thanks in advance
Michael Hooker