<?php
while($row=mysql_fetch_array($res))
{
//Result;
//select the sum in here;
$sumQry = "SELECT SUM(amount) FROM login WHERE tdate = '<?php echo date("F d, Y" ,time()); ?>" />' ";
}
?>
ERROR Parse error: syntax error, unexpected T_STRING in ... on line 4
i want to calculate the sum of numbers ( i mean like 10+50+85+90) for today date and diplsay the sum in fount end. so used the above code. but i think some thing wrong with <?php echo date("F d, Y" ,time()); ?>
UPDATE Ok. Thanks guys! Leave about date. but i am not able to display the sum for total also.
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in ** on line 3
<?php
include "db.php";
while($row=mysql_fetch_array($res))
{
//Result;
//select the sum in here;
$sumQry = "SELECT SUM(amount) FROM login";
}
?>