我有一个带有“postId”的sql表作为字段,我试图在用户点击链接时将其“获取”到一个URL中

My problem is: I have an sql table with "postId" as a field, I'm trying to "get" that into a url when the user clicks a link

$con = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);

$result = mysqli_query($con,"SELECT * FROM posts"); //You don't need a ; like you do in SQL

echo "<table border='1'>"; // start a table tag in the HTML

while($row = mysqli_fetch_array($result)){   //Creates a loop to loop through results
echo "<tr><td>" . $row['user'] . "</td><td>" . $row['text'] . "</td><td> <form action="comment.php?=    <?=$row['postId'];?>" method="post">
<input type="button" name="submit" value="Comment">
</form> </td></tr>";  //$row['index'] the index here is a field name//$row['index'] the index here is a field name
}

echo "</table>"; //Close the table in HTML
?>

This is my code, my error states:

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/content/79/10635579/html/ask/views/logged_in.php on line 24

Although I get that error, I'm probably formatting it wrong or not doing it right overall. Thanks!

EDIT - FULL CODE:

<div>
<!-- if you need user information, just put them into the $_SESSION variable and output them here -->
Hey, <?php echo $_SESSION['user_name']; ?>.
You are logged in.
Try to close this browser tab and open it again. Still logged in! ;)
</div>

<form name="input" action="views/makePost.php" method="get">
Post: <input type="text" name="text">
<input type="submit" value="Submit">
</form>

<?php 

require_once("./config/db.php");

$con = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);

$result = mysqli_query($con,"SELECT * FROM posts"); //You don't need a ; like you do in SQL

echo "<table border='1'>"; // start a table tag in the HTML

while($row = mysqli_fetch_array($result)){   //Creates a loop to loop through results
echo "<tr><td>" . $row['user'] . "</td><td>" . $row['text'] ."</td><td> 
<form action='comment.php?postid=".$row['postId']."' method='post'>
<input type='button' name='submit' value='Comment'>
</form> </td></tr>";
}

echo "</table>"; //Close the table in HTML
?>

<div>
<!-- because people were asking: "index.php?logout" is just my simplified form of "index.php logout=true" -->
<a href="index.php?logout">Logout</a>
</div>
 echo "<tr><td>" . $row['user'] . "</td><td>" . $row['text'] ."</td><td> 
<form action='comment.php?postid=".$row['postId']."' method='post'>
<input type='submit' name='submit' value='Comment'>
</form> </td></tr>";