There must be at least 5 different ways to pass along a particular posted variable from one form page to the next page.
I don’t want the variable visible in the URL.
In fact, I’d like to incorporate that posted id variable as soon as the form is submitted to the database to be used directly inside the next custom query API that retrieves the just saved database record.
So that instead of referring to the last Key ID (as in autoincremented id) I want that unique field variable to limit the database query to fetch the newly saved database record.
And I see options to refer to a json string to get and apply that value to the page record retrieval API.
Although I’m on a php project I don’t want to use my tried & true PHP solutions.
So – from
form submit page
—> on to
form retrieve data page
{{$_POST.story_ID}} (generated as a text string from a time value using year-month-day down to hours-minutes-seconds)
I want to pass into the actual API sql query so that the query launches with the story_id just posted as the WHERE condition.
I added another step to my insert form query to grab the POSTED story_id and save that value as a named variable that I can refer to in my Get Record API.
So, instead of setting up another action in my page 2 “Retrieve just saved Record” page using another file include to just pull the $_POST.story_id I could retrieve this page with that value already used as the WHERE parameter.
But I’m sure I haven’t set this up correctly . . .