I wanted to add user_ID next to the input he submits with a form created by your form manager
so I know which user entered that input and i can show him things accordingly.
I tried this
[size=small]https://userspice.com/advanced-form-processing/[/size]
[size=x-small][size=small][font=Monaco, Consolas, Courier, monospace]But i am getting errors.[/size][/font][/size]
[size=x-small][size=small][font=Monaco, Consolas, Courier, monospace]Also tried this:[/size][/font][/size]
[size=x-small][size=small][font=Monaco, Consolas, Courier, monospace]but this only inserts, and I wanted to modify the added row to add user id to it. The update feature from documentation needs me to specify row but I cant know what row is that.[/size][/font][/size]
[size=x-small][size=small][font=Monaco, Consolas, Courier, monospace]How can one achieve adding user id variable to the row that user submitted to database? Thanks!
[/size][/font][/size]
<h1> nvm solved!</h1>
so I know which user entered that input and i can show him things accordingly.
I tried this
if(!empty($_POST)){
$response = preProcessForm();
$response['fields']['user_id']=$user->data()->id;
if($response['form_valid'] == true){
//do something here after the form has been validated
$response = postProcessForm($response)
}
}
[size=small]from here:[/size][size=small]https://userspice.com/advanced-form-processing/[/size]
[size=x-small][size=small][font=Monaco, Consolas, Courier, monospace]But i am getting errors.[/size][/font][/size]
[size=x-small][size=small][font=Monaco, Consolas, Courier, monospace]Also tried this:[/size][/font][/size]
$my_user_id = $user->data()->id;
if(!empty($_POST)){
processForm();
$db->insert("tablemain", ["userid"=>$columnmy_user_id]);
//do something here after the form has been validated}
[size=x-small][size=small][font=Monaco, Consolas, Courier, monospace]but this only inserts, and I wanted to modify the added row to add user id to it. The update feature from documentation needs me to specify row but I cant know what row is that.[/size][/font][/size]
[size=x-small][size=small][font=Monaco, Consolas, Courier, monospace]How can one achieve adding user id variable to the row that user submitted to database? Thanks!
[/size][/font][/size]
<h1> nvm solved!</h1>