Home>
I use Phalcon for the framework.
I want to get the value sent by POST in view.
Press the edit button on the management page → POST post ID to edit.php
Get ID in edit.php, search ID from database and set value in edit form
I want to process, but the controller cannot receive the ID.
Add editno POST sent by controller to $fid
$fid = $this->request->getPost ("editno");
var_dump in view
<? php var_dump ($fid)?>
and NULL are displayed. I wonder if I couldn't send POST,
The ID is displayed when you echo the view.
<? php echo $_POST ["editno"];?>
I think this is the first time I've used a framework, and I don't understand the flow of processing.
How can we pass values from view to controller?
-
Answer # 1
Related articles
- php - about passing value to form using tag
- php $_post value is null
- php - stumble when passing a value to a template @included in laravel
- java - passing by value and calling methods
- php - i want to display the value of a custom field as a column in the wordpress custom post list
- javascript php → javascript pass by value
- about php post
- mvc - rust: passing a referenced vec in mpsc gives a lifetime error
- should i use `filter_var` for php's` $_post` value?
- php - i want to check the array and put its value in the database if there are no duplicates
- php - the return value of array_multisort becomes 1
- php - i can't access the value i got using get in laravel from view
- i want to group by a specific value between php associative arrays and aggregate them
- c ++ - questions about passing by value and passing by reference
- php - function execution and return value after routing without framework
- php - i want to specify the value of getmimetype () in the part to do new uploadedfile ()
- php - i would like to know how to get each past numerical value with "ahrefs api"
- php - about mvc routing map
- php - laravel: value obtained by pluck cannot be obtained by foreach
- i want to get the csv value correctly using php
Trends
You need a procedure to pass variables from Controller to View
Volt: Template engine
$this->view->setVar ("fid", $fid);
How about checking if you are doing?