A
A
Andrey Angelovich Stock2018-03-22 15:38:39
PHP
Andrey Angelovich Stock, 2018-03-22 15:38:39

Variable visibility?

Hello! There is a PHP file in which a response comes from the API with a token and is written to a variable. Then, when you click on the button, Ajax loads another PHP file where this token is used. Question: how can I transfer a token from one file to another?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stanislav B, 2018-03-22
@your_uncle

It is not entirely clear what you are doing there, but I will assume that after

There is a PHP file in which a response comes from the API with a token and is written to a variable
your script ends and your variable turns into a pumpkin. Therefore, you need to save your data somewhere. A database, for example, or a session can help you with this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question