Help Me To show Time Greetings 2 visitors in PHP

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Help Me To show Time Greetings 2 visitors in PHP

    Help Me To show Time Greetings 2 visitors in PHP
    I hav made a small scpipt but doesnt wrk Pls Any1 Help Me


    Here is it

    <?
    echo"Good ";
    if(time >=6) print"Morning";
    else if(time >=12) print"Afternoon";
    else if(time >=16) print"Evening";
    else if(time >=21) print"night";
    echo"!";
    ?>

    #2
    Originally posted by prajwal View Post
    Help Me To show Time Greetings 2 visitors in PHP
    I hav made a small scpipt but doesnt wrk Pls Any1 Help Me


    Here is it

    <?
    echo"Good ";
    if(time >=6) print"Morning";
    else if(time >=12) print"Afternoon";
    else if(time >=16) print"Evening";
    else if(time >=21) print"night";
    echo"!";
    ?>
    PHP Code:
    <?
    putenv("TZ=Asia/calcutta");

    $New_Time = time() + ($TZ * 60 * 60); 

    $show_date=date("D dS F, Y",$New_Time);  
    $show_time=date("H:i",$New_Time);  
    $time=date("G",$New_Time); 

    echo"Good ";
    if($time >=6) print"Morning";
    else if($time >=12) print"Afternoon";
    else if($time >=16) print"Evening";
    else if($time >=21) print"night";
    echo"!";
    ?>
    sigpic

    Comment


      #3
      Thanx Very Much Opticalpigion ,,
      U R a Prety good coder,,

      Comment


        #4
        anybody give me idea to make time greeting message for minute count instead of hour. e.g- per message will be changing after 30 mins.
        Wait...
        sigpic

        Comment

        Working...
        X