Jump to content

Exicuting js from php


Zoud

Recommended Posts

Here's what I have:

[code]
if($num == 0)
echo "<script type=text/javascript language=javascript>alert('BOO!');</script>";
[/code]

But when I try to exicute the script, it will actually write down the <b>alert('BOO!');</b> but it will leave out the <b>script type=text/javascript... ect.</b>.

How do I make it actually alert the message while still using PHP?
Link to comment
https://forums.phpfreaks.com/topic/34336-exicuting-js-from-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.