我在网页上遇到了一些问题,有些是吗?> ?> ?> ?> ?> ?> ?>确实出现在我的页面中,似乎谎言代码没有被解释,但所有内容都已关闭,我不知道它可以来自哪里
下面是我的代码
<?php
//For weight change
$down_icon = 'images/thumb_down.gif';
$same_icon = 'images/cool.gif';
$up_icon = 'images/thumb_up.gif';
$comment_icon = 'images/notebook.gif';
//DB Values for icons
$status_icons[0] = $down_icon;
$status_icons[1] = $same_icon;
$status_icons[2] = $up_icon;
?>
<style>
.fif {display: inline-block;
padding-left:5px;
padding-right: 5px;
/* box-shadow: 8px 8px 0px #aaa;
border-width:1px;
border-style:dashed;
border-color:black;}*/
}
</style>
<table class="noborder">
<tr><td>
<div class="uibutton-group">
<a class="uibutton" href="index.php?p=history&day=1">Lundi</a>
<a class="uibutton" href="index.php?p=history&day=2">Mardi</a>
<a class="uibutton" href="index.php?p=history&day=3">Mercredi</a>
<a class="uibutton" href="index.php?p=history&day=4">Jeudi</a>
<a class="uibutton" href="index.php?p=history&day=5">Vendredi</a>
<a class="uibutton" href="index.php?p=history&day=6">Samedi</a>
<a class="uibutton" href="index.php?p=history&day=7">Dimanche</a>
</div>
</td>
<td><b>Derniers jours en arrière </b> </td>
<td><div class="uibutton-group">
<a class="uibutton" href="index.php?p=history&day=<?php echo $_GET['day'] ?>&farback=30">30</a>
<a class="uibutton" href="index.php?p=history&day=<?php echo $_GET['day'] ?>&farback=60">60</a>
<a class="uibutton" href="index.php?p=history&day=<?php echo $_GET['day'] ?>&farback=90">90</a>
<a class="uibutton" href="index.php?p=history&day=<?php echo $_GET['day'] ?>&farback=120">120</a>
</div></td>
</tr>
</table><p><br></p>
<div class="maindivforexos" style="width:100%;display:inline-block">
<?php
if (!isset($_GET['day'])) {
$_GET['day'] = 1;
}
if (isset($_GET['farback'])) {
$farback = $_GET['farback'];
} else {
$farback = 28;
}
$query = "SELECT `record` FROM `workouts`
WHERE `workouts`.`day_number`='1'
AND `workouts`.`user` = {$_SESSION['userid']}
AND `workouts`.`record` >= SUBDATE(now(),INTERVAL {$farback} day)
GROUP BY `record` ";
$result = mysql_query($query);
if (!mysql_num_rows($result)):
?>
<div class=warning>Il n'y a pas d'enregistrements pour ce jour.</div>
<?php
else:
while ($cr = mysql_fetch_array($result)):
?>
<div style="width:200px" class="fif"><table style="width:100%">
<tr class="fbgreybox">
<td colspan="3" style="text-align: center;font-weight: bold">
<img src="images/calendar_2.png"> Séance du : <?php echo date('d-m-Y', strtotime($cr['record'])) ?>
</td>
</tr>
<?php
$sql = "SELECT `exercise` FROM `workouts` WHERE `record` = '{$cr['record']}' AND `user`= {$_SESSION['userid']} GROUP BY `exercise`";
$result = mysql_query($sql);
while ($exo = mysql_fetch_assoc($result)) :
?>
<tr class="fbinfobox">
<td colspan="3" style="text-align: left">
<img src="images/Sport-dumbbell.png"> <?php echo exerciseName($exo['exercise']) ?>
</td>
</tr>
<tr>
<td style="text-align: center;font-weight: bold">Séries</td>
<td style="text-align: center;font-weight: bold">Reps</td>
<td style="text-align: center;font-weight: bold">Poids</td>
</tr>
<?php
$rqt = "SELECT `set_number`, `reps`, `weight` FROM `workouts` WHERE `exercise` = {$exo['exercise']} AND `record` = '{$cr['record']}' AND `user` = {$_SESSION['userid']} ORDER BY `set_number`";
$result2 = mysql_query($rqt);
while ($detail = mysql_fetch_assoc($result2)):
?>
<tr>
<td>
Série <?php echo $detail['set_number'] ?>
</td>
<td>
<?php echo $detail['reps'] ?>
</td>
<td>
<?php echo $detail['weight'] ?>
</td>
</tr>
?>
<?php
endwhile;
endwhile;
?>
</table>
</div>
<?php
endwhile;
endif;
?>
</div>
我真的没有Idead可以来自哪里因为所有打开的标签都已关闭。 它出现在div和循环中的表之间
非常感谢Anykind的帮助
答案 0 :(得分:2)
您的代码中似乎有一个额外的结束PHP标记。
<?php echo $detail['weight'] ?>
</td>
</tr>
?> <----------here