Connecting the functionality of php code to html pop-up

This code is in the php file:

if (empty($error) && $_POST['set_p_v'] == 0){
	echo '<script type="text/javascript">alert("myPopup")</script>'; 
}

how do I connect that to a separate html file, that has this:


function myFunction() {
  var popup = document.getElementById("myPopup");
  popup.classList.toggle("show");
}

and this:

<span class="popuptext" id="myPopup">

and where does the pop-up message/text go?

I look forward guidance/assistance

Sponsor our Newsletter | Privacy Policy | Terms of Service