<?php
session_start();
if (!isset($_SESSION['username'])) {
header('Location: LoginForm.php');
}
?>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Secured Page</title>
<style>
.db-table {position:absolute;top:95px;left:300px;}
</style>
</head>
<body>
<p align="left" style="margin-left:0px; margin-top:135px;">
<form action="Secured_Page_Search.php" method="post">
Select_Table_To_Display:<br><select name="Table">
<option value="members">Members</option>
<option value="online">Online</option>
<input type="submit" name="submit_name" />
</form>
<title>Secured Page</title>
<style type="text/css">
body{font-family:Impact;}
#container{width:10000px;margin:auto;font-size:15pt;}
#menu{position:absolute;margin-top:10px;}
#menu ul .item{display:none;}
#menu ul:hover .item{display:block;background:#white;padding:1px;margin:1px;}
#menu ul:hover .item a{color:#abc;text-decoration:none;}
#menu ul:hover .item a:hover{color:grey;}
#menu ul{width:110px;float:left;margin:0px;padding:2px;background:white;list-
Style:none;}
.clear{clear:both;height:10px;}
</style>
<div id="container">
<h1></h1>
<div id="menu">
<p align="left" style="margin-left:0px; margin-top: 0px;">
<br><FONT FACE="arial">Logged In @: (<?php echo $_SESSION['username']; ?>)</FONT></p>
</p>
<ul id="item1">
<li class="top">Profile</li>
<li class="item"><a href="#">Profile User</a></li>
<li class="item"><a href="#">Profile I.M.</li>
<li class="item"><a href="#">Profile O.P.</a></li>
</ul>
<ul id="item1">
<li class="top">Edit</li>
<li class="item"><a href="#">Edit User</a></li>
<li class="item"><a href="#">Edit I.M.</li>
<li class="item"><a href="#">Edit O.P.</a></li>
</ul>
</div>
<div class="clear"></div>
</body>
<br><FONT FACE="arial">
<?php
$Table = 'members';
$mysqli = new mysqli("XXXXXXXX", "XXXXXXXX", "XXXXXXXX", "XXXXXXXXXX");
$result = $mysqli->query("SHOW TABLES");
while ( $row = $result->fetch_row() ){
$table = $row[0];
$result1 = $mysqli->query("SELECT * FROM $Table ORDER BY dt DESC LIMIT 0,12");
if($result1) {
echo '<table cellpadding="15" cellspacing="20" class="db-table">';
$column = $mysqli->query("SHOW COLUMNS FROM $Table");echo '<tr>';
while($row3 = $column->fetch_row() ) {
echo '<th>'.$row3[0].'</th>';
}
echo '</tr>';
while($row2 = $result1->fetch_row() ) {
echo '<tr>';
foreach($row2 as $key=>$value) {
LINE 110 ----> echo '<td style="padding-top:0px;padding-bottom:0px;">',$value,'
<a href="edit.php?id=<?' echo $row['id']; '?>">'Edit'</a></td>;'<------Line 110
}
echo '</tr>';
}
echo '</table><br />';
}
}
$mysqli->close();
?>
<FONT FACE="impact">
<p align="left" style="margin-left:100px; margin-top:100PX;">
<form action="Secured_Page_Search_Email.php" method="post">
Search, Email:<br> <input type="text" name="email"><br>
<input type="submit" name="submit_name" />
</form>
<p align="left" style="margin-left:100px; margin-top:10px;">
<form action="Secured_Page_Search_User.php" method="post">
Search, User:<br> <input type="text" name="usr"><br>
<input type="submit" name="submit_name" />
</form>
</FONT></p>
</body>
</html>
基本上我需要用编辑链接打印 mysql 表......看起来很容易,但过去几个小时一直在与这个问题作斗争。有问题的线路:
基本上我需要用编辑链接打印 mysql 表......看起来很容易,但过去几个小时一直在与这个问题作斗争。有问题的线路:
LINE 110 ----> echo '<td style="padding-top:0px;padding-bottom:0px;">',$value,'
<a href="edit.php?id=<?' echo $row['id']; '?>">'Edit'</a></td>;'<------Line 110
更新代码 更新代码
echo '<td><a href="edit.php?id='.$row['id'].'">'Edit'</a></td>;'
解析错误:语法错误,意外的 T_ECHO,期待 ',' 或 ';' 在 Secured_Page_Edit.php 第 113 行