I have a table showing the results, I want to give people the opportunity to update the results of a cell or field separately, without requiring a full update form
Here is what I have:
echo "<select name='tv_taken' id='tv_taken' onchange='window.location=\"samepage.php?update=tv_taken&update_id=$tv_id\" '>";
As you can probably specify its selection box with a list of users. Now the only problem is that I need to pass the new selected value to the url string, so I want a new select value.
So let's say that it was mary, and someone selects a new user, John, I want something like this
echo "<select name='tv_taken' id='tv_taken' onchange='window.location=\"samepage.php?update=tv_taken&update_id=$tv_id&user_name=$find_username\" '>";
What I'm not sure is there a way to pass the changed value through php or do I need a javascript solution?
Then i use
IF if(isset($_GET['tv_id'])) { Do the update }
This is not a public site, so I assume that there is a safer way to do this, but it will probably be enough, since it will be only team members using it who need to be logged in before they can see this page .
source share