Reputation: 59
I need a simple ok alert box in my php file.
Upvotes: 0
Views: 4424
Reputation: 41
Try that:
echo '<script type="text/javascript"> alert("Text!") </script>';
Upvotes: 3
Reputation: 131921
Not possible in PHP, because it runs on a server. The alert box is a client side feature. You must use Javascript.
Upvotes: 3