Need help for mini chat program
Posted: Wed Sep 28, 2011 3:02 am
I want to have program like image 1.
I have code
But it only show new content chat, and lost old content.
How i fix it?
I have code
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<?php
?>
<input type="hidden" name="des" id="des">
</input>
<?php
$str=" ";
if (isset ($_POST["txtNi1"]))
{
$text1 =$_POST["txtNi1"];
echo ("<br/>");
$str.=$text1."\\";
echo $str;
}
if (isset ($_POST["txtNi2"]))
{
$text2 =$_POST["txtNi2"];
echo ("<br/>");
$str.=$text2."\\";
echo $str;
}
?>
<body>
<form name="form1" method="post" action="test4.php">
<table>
<tr>
<td>Nick 01: </td>
<td><input name="txtNi1" type="text" id="txtNi1"/></td>
</tr>
<tr>
<td colspan="2" align="center" > <input name="Send1" type="submit" value="Send" /></td>
</tr>
</table>
</form>
<form name="form2" method="post" action="test4.php">
<table>
<tr>
<td>Nick 02</td>
<td><input name="txtNi2" type="text" id="txtNi2"/></td>
</tr>
<tr>
<td colspan="2" align="center"> <input name="Send2" type="submit" value="Send" /></td>
</tr>
</table>
</form>
<div id="place" > </div>
<td><input type="hidden" name="" value="" id="textHid"/></td>
<input type="hidden" name="textHid" value="" id="textHid"/></span>
</body>
</html>
How i fix it?