Posted by sentinel on 10/13/45 11:27
Code:
01: $dan = date('d');
02: $mjesec = date('m');
03: $godina = date('Y');
04: $poolp = mysql_query("SELECT * FROM `pool_pitanja`");
05: while ($rpool = mysql_fetch_array($poolp,MYSQL_ASSOC)){
06: if ($rpool{'pgod'}<=$godina and $rpool('kgod')>=$godina){
07: if ($rpool('pmje')<=$mjesec and $rpool('kmje')>=$mjesec){
08: if ($rpool('pdan')<>$dan and $rpool('kdan')>=$dan){
09: print "Sve ok";
10: }
11: else {print "Dan nije dobar";}
12: }
13: else {print "Mjesec Nije Dobar";}
14: }
15: else {print "Godina nije Dobra";}
16: }
Error:
Fatal error: Function name must be a string in
C:\Inetpub\elmahr\new\page.header.php on line 6
What is the problem here?
the fields in the sql are varchar
or better yet:
how do i insert date into sql and then compare it with today?
i must have pool start date and pool end date
and if today is in between do something, else do nothing
help?
thanks
Navigation:
[Reply to this message]
|