Results 1 to 2 of 2

Thread: filemtime function

  1. #1
    Join Date
    Nov 2009
    Posts
    76,596

    Default filemtime function

    Code:
    <?
    $check = "test";
    $check .= $filename;
    if ($test == $check)
    {
    print("<HTML><BODY>You have already voted. Thank you.</BODY></HTML>");
    }
    else
    {
    $rated = "test";
    $rated .= $filename;
    setcookie(test, $rated, time()+86400);
    print("<HTML><BODY><br>You haven't voted before so I recorded your vote</BODY></HTML>");
    }
    ?>

  2. #2
    Join Date
    Nov 2009
    Posts
    76,596

    Default

    Average number using PHP

    Code:
    <?
    $total_ratings = (3+2+3+1+5+2+3);
    $total_votes = 7;
    $average = $total_ratings / $total_votes;
    print("The Average Rating Is: $average");
    ?>
    

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
  •