Answers for "php alert popup box"

PHP
13

alert in php

echo '<script>alert("Message")</script>';
Posted by: Guest on August-06-2020
0

php pop up message

Copy Code<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>JavaScript Alert Box by PHP</title>
<?php  
echo '<script type="text/javascript">';
echo ' alert("JavaScript Alert Box by PHP")';  //not showing an alert box.
echo '</script>';
?>
</head>

<body>
</body>
</html>
Posted by: Guest on March-23-2020
0

php pop up message

Copy Code<?php
function  createConfirmationmbox(){
    echo '<script type="text/javascript"> ';
    echo ' function openulr(newurl) {';
    echo '  if (confirm("Are you sure you want to open new URL")) {';
    echo '    document.location = newurl;';
    echo '  }';
    echo '}';
    echo '</script>';
}
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>JavaScript Alert Box by PHP</title>
<?php
createConfirmationmbox();
?>
</head>
<body>
<strong><a href="javascript:openulr('newurl.html');">Open new URL</a></strong>
</body>
</html>
Posted by: Guest on March-23-2020
0

php pop up message

Copy Code<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>JavaScript Alert Box by PHP</title>
<?php
function_alert("We welcome the New World");

function function_alert($msg) {
    echo "<script type='text/javascript'>alert('$msg');</script>";
}
?>
</head>
<body>
</body>
</html>
Posted by: Guest on March-23-2020

Browse Popular Code Answers by Language