html - Print php output in pop window on submitting the form
796
I would like to print the output of PHP in a pop window after the submission of html form. Below is sample of my code.
<?php
if(isset($_POST['button1']))
{
if("condition match")
{
echo "output1";
}
else
{
echo "output2";
}
}
?>
<form class='n-form' action='#' method='post'>
<div>
<button type='submit' name="button1" class='button'>Submit</button>
<a href="../home.php" class="button">Cancel</a>
</div>
</form>
It should be able to print the echo output in the pop window based on the if condition.
Looking forward to hear.
Answer
Solution:
There is no popout windows in php you have to do it in javascript