#Simple PHP Function

6 messages · Page 1 of 1 (latest)

hidden quarry
#

1-Html form that has 40 buttons each has a droplist with these options (Ready, Booked, Need Cleaning)

2-Database table that has two columns (RoomID, RoomState) i inserted RoomIDs that represent each button for e.g RoomID 101 represent button number "101" and so on( i havent linked the buttons to the database yet)

3-Js code that allows users to change the boxshadow of the button based on which option they choose
I Need the following:

1-When a user chooses an option and changes the boxshadow of a button, i need the changes to remain on the page even when refreshing it (Do Not Use Local Storage) use database and PHP to achieve this.
2- also to link the buttons numbers with the column RoomID in my db

let me know if i should provide the full code. ty

regal coral
#

I don't think we need the code, I think we need to know what you've tried and what you're stuck on.

What you've got here sounds more like a request for someone to write code for you rather than a question.

#

And fwiw this can't be solved with a "simple function." It's gonna require database tables, interfaces for people to configure the buttons, and the code to connect all of that.

hidden quarry
#

i apologies for the syntax of my request, i copied and pasted from chatgbt to save myself some time lol, you are right i created a database to store the RoomID and the color of the options, i tried sending ajax request to a php side-server file that contains the db connection along with the Update and retireve functions, it didnt work

#

although the logic is correct but my implementation seems off

#

i need help with that