Can I pop up alert in javascript using php.

Posted by Shantanu Gupta on Stack Overflow See other posts from Stack Overflow or by Shantanu Gupta
Published on 2010-04-11T22:04:56Z Indexed on 2010/04/11 22:13 UTC
Read the original article Hit count: 275

Filed under:
|
|

I want to trigger javascript alert using PHP. Is it possible

I want to use it in head section, for displaying it at load time.

<head>
    <?php 
    $valid="valid";
        if(!isset($valid))
            echo "<script type=\"text/javascript\"> alert('Hi');</script>";
    ?>
</head>

EDIT

i want to display javascript alert() at load time after checking existance of session

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about php