這是我的PHP代碼和我已經添加的表格value="<?php echo $username ?>
等等。我已經爲管理員編輯了用戶資料。事情是,沒有錯誤即將到來,但我無法從我的表「用戶」獲取數據
<?php
if(isset($_POST["submit"]))
{
$conn = mysqli_connect("localhost", "root", "", "videos") or die("Connection to Server failed!" . mysqli_error());
$query = mysqli_query("SELECT * from users WHERE Id='$_POST[Id]'");
$rows = mysqli_fetch_assoc($query('Id'));
$id = $_Get['Id'];
$result = mysqli_query($query);
if ($rows==$id)
{
while($rows = mysqli_fetch_array($result))
{
$username = $_Get['Username'];
$email = $_Get['Email'];
$employee = $_Get['EmployeeID'];
$designation= $_Get['Designation'];
$password= $_Get['Password'];
}
}
}
?>
所以,請幫我弄明白。
謝謝。
傳遞mysqli_query中的cnnection參數 – user1234