ito po bagong error nya
Notice: Only variables should be passed by reference in
C:\xampp\htdocs\Innerjoin\user\postinsert.php on line
26
Fatal error: Uncaught mysqli_sql_exception: Unknown column 'regisration.user_id' in 'on clause' in C:\xampp\htdocs\Innerjoin\user\postinsert.php:33 Stack trace: #0 C:\xampp\htdocs\Innerjoin\user\postinsert.php(33): mysqli_query(Object(mysqli), 'SELECT * FROM p...') #1 {main} thrown in
C:\xampp\htdocs\Innerjoin\user\postinsert.php on line
33
ito po code ko
<?php
// include navigation with connection and session
include "../partials/newnav.php";
?>
<!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>Posted</title>
<link href="
You do not have permission to view the full content of this post.
Log in or register now." rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<script src="
You do not have permission to view the full content of this post.
Log in or register now." integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script>
<script src="
You do not have permission to view the full content of this post.
Log in or register now." integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF" crossorigin="anonymous"></script>
<script src="
You do not have permission to view the full content of this post.
Log in or register now."
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
</head>
<body>
<?php
if (isset($_POST['post'])) {
$page_content = $_POST['post_content'];
$slq = mysqli_prepare($con, "INSERT INTO post (comment, date_created, user_id) VALUES (?, ?, ?)");
mysqli_stmt_bind_param($slq, "ssi", $page_content, strtotime(date("Y-m-d h:i:sa")), $user_id);
mysqli_stmt_execute($slq);
}
?>
<?php
// display query from post database
$post_query = mysqli_query($con, "SELECT * FROM post left join registration on regisration.user_id = post.user_id order by dated_posted DESC limit 1 ") or die(mysqli_error());
$result = mysqli_num_rows($post_query);
if($result > 0) {
while ($post_row = mysqli_fetch_array($post_query)){
$id = $post_row['comment_id'];
$uid = $post_row['user_id'];
$postedby = $post_row['username'];
}
} else {
echo "No Existing Comment";
}
?>
<!-- body of posted -->
<div class="container col-md-6 bg-body-tertiary border">
<h5>Posted by: <a href="#" style= "margin-left:10px; text-decoration:none;"> <?php echo $posted_by; ?></a></h5>
<h1><?php echo $post_row['comment'] ?></h1>
</div>
</body>
</html>