-1

I want to stop php/html code in the middle and continue the code by clicking on continue button Eg:

<? php
echo "Hello";
// i want php code to stop after echo Hello here
// and also Here i want Continue Button , after clicking on continue button rest of the code will run , i.e
echo "World";
// So the final result will be-  HelloWorld
Roger007
  • 29
  • 5
  • It's better to use Javascript (and JQuery) for that. PHP is normally never paused, and why would you want to hold up a process on your server? It's, for instance, better to let PHP send everything to client (= browser?), use CSS to make the second bit invisible, and then show it with a bit of Javascript. – KIKO Software Nov 23 '17 at 21:14

1 Answers1

1

Here's a simple example of what I proposed in my comment:

Hello

<input type="button" value="Click Me" onclick="document.getElementById('secondBit').style.display = 'inherit';">

<span id="secondBit" style="display:none;">World</span>

I know there's no PHP here, but you can replace the 'Hello' and 'World' by any PHP code. Note that it is only the OUTPUT of the PHP code that is made invisible, the code itself executes directly without any delay.

KIKO Software
  • 15,283
  • 3
  • 18
  • 33