I have a chat script that I made, but...It doesn't work like I'd like it to. I can post a message, and it shows up where I want it to, yet, when I put another message, it deletes the previous one, which I don't want.
I wan't it to be like, a BB kind of, but like say 'Person a says, blah blah'. Like that, not a true BB though.
Here's my code I have.
<!-- Begin Chat Script -->
<?php
$con = mysql_connect("localhost","username","password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}mysql_select_db("db", $con);$sql="INSERT INTO Contacts (chat)
VALUES
('$_POST[chat]')";if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo $_POST[chat];
?>
<br><br><br><br><br><br><br><br>
<?php
include("more_footer.php");
?>
<form action="members.php" method="post">
<br />
<input type="text" name="chat"><br />
<input type="submit" value="Submit">
</form>
<!-- End chat Script -->