A
A
Alisher Taubaldy2021-04-08 06:32:43
PHP
Alisher Taubaldy, 2021-04-08 06:32:43

How to get json after form submit?

$loadurl = 'https://pu.mycdn.me/uploadImage?apiToken=pVE****************************'
echo '<form method="GET" enctype="multipart/form-data" action="' . $loadurl  . '">
    <input type="file" name="pic1" accept="image/*" />
    <input type="submit" /> </form>';


Wrote a form in php.
Main task: to get the data that the form returns

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya, 2021-04-08
@rpsv

The form sends a request to a third-party address, so there are several options:
1. AJAX send a request instead of submitting the form
2. send the form to a service on your server and there already make a request to the desired address (guzzle or curl if the first one is difficult)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question