bakit kaya ataw lumabas ng echo ko sa textarea pero kapag nilalagay ko naman sa input lumalabas sya
ito code ko
<?php
include 'navbar.php';
?>
<?php
$id_comment = $_REQUEST['id'];
$get_record = mysqli_query($con, "SELECT * FROM adminpost where comment_id = $id_comment") or die (mysqli_error($con));
while ($row_edit = mysqli_fetch_assoc($get_record)){
$title = $row_edit['title'];
$content = $row_edit['comment'];
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Homepage</title>
<link rel= "stylesheet" href="../css/bootstrap.css">
<link rel= "stylesheet" href="../css/style.css">
<script src="../js/bootstrap.bundle.js"></script>
<script src="../js/style.js"></script>
<script src="../ajax/sweetalert2.all.min.js"></script>
<script src="../ajax/jquery-3.7.0.min.js"></script>
<script src="You do not have permission to view the full content of this post. Log in or register now." referrerpolicy="origin"></script>
</head>
<body>
<div class="container col-md-6">
<div class="mb-5 text-center">
<h1>Discussion Thread</h1>
</div>
<form method="POST" action="postupdate.php">
<div class="input-group mb-2">
<input type="hidden" name="postudate" value = "<?php echo $id_comment; ?>">
<span class="input-group-text fw-bold" id="basic-addon1">TITLE</span>
<input type="text" name="postcontent" class="form-control" value="<?php echo $title; ?>" aria-label="Username" aria-describedby="basic-addon1" required>
</div>
<label class="fw-bold mb-2" for="w3review">Content:</label>
<textarea id= "default" name="post_content" value="<?php echo $content; ?>" class="form-control" id="post" rows="10" cols="50" ></textarea>
<div class="form-group mb-5 mt-2" style="text-align: right">
<input type="submit" name="update" class="w-25" value="Update" style="background-color:#0D52C7;">
</div>
</div>
</form>
<?php
include "../partials/footer.php";
?>
<script>
</script>
</body>
</html>
ito code ko
<?php
include 'navbar.php';
?>
<?php
$id_comment = $_REQUEST['id'];
$get_record = mysqli_query($con, "SELECT * FROM adminpost where comment_id = $id_comment") or die (mysqli_error($con));
while ($row_edit = mysqli_fetch_assoc($get_record)){
$title = $row_edit['title'];
$content = $row_edit['comment'];
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Homepage</title>
<link rel= "stylesheet" href="../css/bootstrap.css">
<link rel= "stylesheet" href="../css/style.css">
<script src="../js/bootstrap.bundle.js"></script>
<script src="../js/style.js"></script>
<script src="../ajax/sweetalert2.all.min.js"></script>
<script src="../ajax/jquery-3.7.0.min.js"></script>
<script src="You do not have permission to view the full content of this post. Log in or register now." referrerpolicy="origin"></script>
</head>
<body>
<div class="container col-md-6">
<div class="mb-5 text-center">
<h1>Discussion Thread</h1>
</div>
<form method="POST" action="postupdate.php">
<div class="input-group mb-2">
<input type="hidden" name="postudate" value = "<?php echo $id_comment; ?>">
<span class="input-group-text fw-bold" id="basic-addon1">TITLE</span>
<input type="text" name="postcontent" class="form-control" value="<?php echo $title; ?>" aria-label="Username" aria-describedby="basic-addon1" required>
</div>
<label class="fw-bold mb-2" for="w3review">Content:</label>
<textarea id= "default" name="post_content" value="<?php echo $content; ?>" class="form-control" id="post" rows="10" cols="50" ></textarea>
<div class="form-group mb-5 mt-2" style="text-align: right">
<input type="submit" name="update" class="w-25" value="Update" style="background-color:#0D52C7;">
</div>
</div>
</form>
<?php
include "../partials/footer.php";
?>
<script>
</script>
</body>
</html>