0
Modify $_POST in php
is there a way to modify the $_post variable with php directly?
1 Antwort
+ 1
by modify if you mean to set new value to $_POST you can simply assign new value to it like this:
$_POST['input-name'] = 'new value';
or you can assign an associative array to $_POST:
$arr = array( 'name' => 'John' , 'age' => 25 );
$_POST = $arr;
$_POST['name'] // John
$_POST['age'] // 25