Variable value canceled immediately

I can’t understand why this happens:
I have the variable $sender_id which is immediately canceled.

$sender_id=1;
echo " sender_id:".$sender_id; ← displays empty value

It is declared in a form application, OnLoad event
The strange thing is that I change the name, for example $id_mit the value is left unchanged.
The only particular thing is that $sender_id has the same name as a field in the table, i.e. sender_id.
Could it be due to this?
Thank you all

I think SC is not good idea use same name for fields and variables… Try use $v_sender_id

2 Likes

You were right, I changed the variable name to $v_sender_id and it works perfectly.
However, it would be important for this to be highlighted in the Scriptcase online help in the variables section, because I believe it could also create problems for other users.
Grazie per il tuo contributo.

1 Like

a mi me ocurrio, nunca pongas variables con el mismo nombre que los campos. Yo a las variables siempre las denomino $_ , para que no me solape con los campos

1 Like