我是PHP新手,我試圖在taskDueDate爲Today的情況下回顯JavaScript警告框。 任何建議:如果今天是日期,Echo警報
$varTaskAlert = mysql_query("SELECT * FROM tasks");
while ($rows = mysql_fetch_array($varTaskAlert)) {
$varTaskID = $rows['taskid'];
$varTaskTitle = $rows['tasktitle'];
$varTaskDetail = $rows['taskdetail'];
$varTaskResource = $rows['taskresource'];
$varTaskDue = $rows['taskduedate'];
$varTaskStatus = $rows['taskstatus'];
$varTaskType = $rows['tasktype'];
$active = Active;
$curdate = date('y/m/d');
if ($varTaskStatus == $active && $varTaskDue == $curdate) {
echo '<script type="text/javascript">alert("The Task <?php echo $varTaskTitle ; ?> is Today.")</script>';
}
}
你會得到任何錯誤? –
以哪種格式存儲在數據庫中? –
發生了什麼事?錯誤?沒有迴應? – bjb568