Question of a user comment in PHP
I wrote a program, the user can comment on the submitted article, the code is as follows,
<title></title>
Session_Start ();
Check whether to log in, and then turn to the login screen if not logged in
if (!isset ($_session[' userid ')) {
Header ("Location:login.html");
Exit ();
}
Include ("menu.php");
echo "Back to homepage";
Include ("config.php");
$sql = "SELECT * from text where id={$_get[' id '}";
$result =mysql_query ($sql, $conn);
echo "
";
if ($row =mysql_fetch_assoc ($result)) {
echo $row [' title '];
echo "
";
echo "Author:". $row [' author '];
echo "Date of publication:". Date ("Y-m-d h:m:s", $row [' time ']);
echo "
";
echo $row [' article '];
echo "
";
}else{
echo "The article does not exist";
}
?>
Want to know how to put the PHP code in the $row["id" to the docomment.php, so that he can be called in the docomment.php, ask the great God teach you
------Solution--------------------
action= "Docomment.php?id="
docomment.php page using $_get[' ID ').
Or put a hidden text in the form input value is $row["id"]
------Solution--------------------
Reference:
action= "docomment.php?id="