는이 스크립트 내가 (ID, DSC, 학교를) 요청 된 데이터를 표시하지만, 메신저 라인 (20)PHP 스크립트 - 예기치 않은 :에서 '}'
{
if ($row['suspended']==1){
구문 분석 오류 오류가} 구문 오류, 예기치 않은 ' C는 : \ WAMP \ www가 \ unit5 스크립트 \ \ 스크립트는 여기 참조 (20)
<?php
include("dbconnect1.php");
$query = "SELECT id,dsc, school FROM module WHERE dsc LIKE '%%%s%%'";
$link = @ mysql_query($query);
if (!$link) {
header("location:../account/account.master.php?page=invalid&errorcode=1");
die();
}
$i=0;
$status="";
while ($row = mysql_fetch_array($link, MYSQL_ASSOC))
{
if ($row['suspended']==1){
$status="SUS";
}
echo "
<tr id='row$i' class='trows'>".
"
<td id='id$i'>".$row['id']."</td>".
"
<td id='dsc$i'>".$row['dsc']."</td>".
"
<td id='school$i'>".$row['school']."</td>".
"
</td>".
"
<td><input type='radio' name='whome' id='showMe$i' onclick='showMem($i)' /></td>
";
if ($status=='SUS'){
echo "
<td><input type='radio' name='suspend' checked='checked' disabled='disabled' /></td>
";
} else {
echo "
<td><input type='radio' name='suspend' id='suspend$i' onclick='suspendMem($i)' /></td>
";
}
echo "
<td><input type='radio' name='delete' id='delete$i' onclick='deleteMe($i)' /></td>
".
"
<td id='status$i'>".$status."</td></tr>";
$i++;
$status="";
}
?>
라인 meminclude.php :
<script type="text/javascript">
$(document).ready(function() {
var numrecs=$(".trows").length;
var me= $('#th1').html()+" - "+(numrecs)+" Records in Table.";
$('#th1').html(me);
RiVm=numrecs;
});
</script>
<link rel="stylesheet" href="../css/results.css" type="text/css" />
<div id="appleft">
<form id="myapprovelist" method="post">
<fieldset style="border:none">
<table id="myTable">
<tr><th id="th1" colspan="10">Active Membership List</th></tr>
<tr class="red">
<th>ID</th>
<th>DSC</th>
<th>School</th>
</tr>
<?php include("../scripts/meminclude.php")?>
</table>
</fieldset>
</form>
</div>
<div id="appright">
<img id="theBroon" src="" alt="" /><br />
<span id="myBroon"></span>
</div>
</div>
<div style="clear:both">
</div>
이러한 오류를 정렬이 같은 주제를 열고, 자신의 사소한 구문 분석 오류를하지 수정해야합니다. –
'dbconnect1.php' 코드를 붙이면 괜찮아 보입니다. – rogal111
showMem ($ i)이 showMem ({$ i})으로 변경됩니다. –