A
A
Aleksey2020-04-20 12:20:52
PHP
Aleksey, 2020-04-20 12:20:52

How to run the desired php code on button click?

How to write a string to execute PHP code on click?

Here is more specific:
there is php-code:

<?php echo do_shortcode( '[browser-shot url="http://mail.ru/" width="700"]Add Caption[/browser-shot]' ); ?>

--- A screenshot is taken here.
You need to make this process run when the button is pressed.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton R., 2020-04-20
@anton_reut

Make an empty form, the button will be Submit, and the action is this code of yours.

S
scottparker, 2020-04-20
@scottparker

make a button and put a request on it, so the php script will run without reloading the page (maybe this is important)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question