Neuro Virus
-
Posts
2 -
Joined
-
Last visited
Never
Posts posted by Neuro Virus
-
-
[code]<?
$user = $_POST["user"];
$comment = $_POST["comment"];
echo "$user" . "<br>" . "$comment" . "<br><br>";
?>[/code]
Everythign works with no problems except one thing. The code doesnt save the input. In other words when I refresh my comment page it is blank. Nothing is saved. How do I fix this?
trying to code a simple guest book...
in PHP Coding Help
Posted
[code]<?
mysql_connect("localhost","****","****");
mysql_select_db("book");
$user = $_POST[user];
$comment = $_POST[comment];
$sql="INSERT INTO comment (user,comment)
VALUES ('$user','$comment')";
mysql_query($sql);
?>
</head>
<body>
<?
$user = $_POST["user"];
$comment = $_POST["comment"];
echo "$user" . "<br>" . "$comment" . "<br><br>";
?>[/code]