GET parameter’s name have nothing to do with the name of your database fileds(columns) name.
I just told you to make it so POST and GET variable have different names…
You can name your GET parameter idviag for example (and of course check the bindings to much this name)
in your query the condition is wrong… Change the name in condition
It looks like you’re using the Server Connect component on the page to call this. That component ONLY uses GET parameters. On the API file, remove the POST ones and make sure all of your queries and steps only point to GET parameters or results from queries.
You have to add the compnent into your page but lets forget about it for a moment…
I would like to start from scratch so I can understand what exactly is going on.
You have a table in your page that lists records (tableRepeat2). Your primary key in ths table is IDviaggio and there are some other fields + a button that triggers the “sc_update_viaggio” ServeConnect.
Now in “sc_update_viaggio” SC you have a GET input idviaggio and 2 POST inputs posti & cani.
You update your table’s fields posti & cani (filtered by the GET idviaggio value).
Now back in your page, when you click a tableRepeat’s button, you send that row’s IDviaggio value as a GET input idviaggio to “sc_update_viaggio” SC to update the table data.
Am I right?
Question…
The 2 POST inputs posti & cani where are they getting data from?
Are you sure they have data or are just empty fields?
I have a “VIAGGIl” MySQL table where the data are already entered, which are listed correctly on the page
For each record, the two fields that interest me are “posti” and “cani” and the button I added
Then I have a second MySQL “BIGLIETTI” table that contains in addition to other data the two fields that interest me “posti” and “CANI”
On the page the records "BIGLIETTI"are displayed with a query
The goal by clicking on the button of a record VIAGGI is that :
Change in the record POSTI.value and CANI.value by subtracting the value the corresponding POSTI and CANI from BIGLIETTI
Also modify a field of the BIGLIETTI table with a value from a data on the page
Then link to another page
I hope I have described well
Now I’m out for half an hour
In your “sc_update_viaggio” SC add 2 setvalue actions and set the value from the 2 POST inputs and tick the output option in order to see when you click the button what are the values of these 2 inputs
(for example, name inp1= setvalue($_POST.cani) & inp2= setvalue($_POST.posti)