Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: PHP alert help needed

  1. #11
    Join Date
    Dec 2010
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The following is my code:

    <?php
    session_start();
    $_SESSION['$username'];

    require_once("admin/db.php");
    $result = mysql_query("SELECT financealert, username FROM users WHERE financealert='yes'") or die(mysql_error());
    if($user_session == $username && $financealert == 'yes') {
    ?>
    <script type="text/javascript">
    windows.alert('ATTENTION');
    </script>
    <?php
    }
    ?>

    The alert is not showing anyway.

  2. #12
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Please only have one thread per problem. What happened with the code I posted in the previous thread?

    http://www.dynamicdrive.com/forums/s...ad.php?t=59525
    Corrections to my coding/thoughts welcome.

  3. #13
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    If you're still having trouble, something I noticed in the other thread you started is:
    Code:
    <script type="text/javascript">
        windows.alert('ATTENTION');
    </script>
    <!-- should be: -->
    <script type="text/javascript">
        alert('ATTENTION');
    </script>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •