user605505
user605505

Reputation: 59

How can I create an Alert Box in a PHP file?

I need a simple ok alert box in my php file.

Upvotes: 0

Views: 4424

Answers (2)

Newton Calegari
Newton Calegari

Reputation: 41

Try that:

echo '<script type="text/javascript"> alert("Text!") </script>';

Upvotes: 3

KingCrunch
KingCrunch

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

Related Questions