Welcome Guest, Not a member yet? Register   Sign In
CI4 add value to post array
#6

(This post was last modified: 04-26-2022, 05:25 AM by serialkiller.)

(04-20-2022, 11:11 AM)datamweb Wrote:
(04-20-2022, 06:19 AM)serialkiller Wrote:
(04-20-2022, 01:10 AM)datamweb Wrote: Hi, use
Code:
$request->getVar('keyValue');
.

For more information, please read this link.

I don't have to retrieve a value but add one to the post array

Oh!!, I realized.
You must use the following code:

Code:
$rQ=\Config\Services::request();
$rQ->setGlobal('post',['keyValue' => 'Datamweb']);


var_dump( $rQ->fetchGlobal('post','keyValue'));

It doesn't work, it just returns that value, I need all the values in post plus an addition

(04-21-2022, 01:23 AM)ignitedcms Wrote: What are you trying to do?

In a controller I receive the data in post and I need to add a value to the post array
Reply


Messages In This Thread
CI4 add value to post array - by serialkiller - 04-19-2022, 06:42 AM
RE: CI4 add value to post array - by datamweb - 04-20-2022, 01:10 AM
RE: CI4 add value to post array - by serialkiller - 04-20-2022, 06:19 AM
RE: CI4 add value to post array - by datamweb - 04-20-2022, 11:11 AM
RE: CI4 add value to post array - by serialkiller - 04-26-2022, 05:23 AM
RE: CI4 add value to post array - by ignitedcms - 04-21-2022, 01:23 AM
RE: CI4 add value to post array - by ignitedcms - 04-26-2022, 12:32 PM
RE: CI4 add value to post array - by kenjis - 04-26-2022, 05:46 PM



Theme © iAndrew 2016 - Forum software by © MyBB