Ver Mensaje Individual
  #1 (permalink)  
Antiguo 04/05/2010, 15:42
amerkmif
 
Fecha de Ingreso: octubre-2009
Mensajes: 29
Antigüedad: 14 años, 7 meses
Puntos: 0
ayuda en este codigo de un chat

ES que estoy desarrollando una aplicacion en php de un chat y pues me falta unas cositas

el programa esta constituido de la siguiente manera hay 3 crapetas la primera se llama classes que contiene la clase dboperator la otra se llama events que contiene la clase eventsFrmchat y la ultima se llama forms la cual contiene la clase frmChat

esta es la clase eventsFrmchat

Código PHP:
<?php

include "../classes/DbOperator.php";
session_start();
//Variable de session para almacenar los mensajes 
$_SESSION['mensajesChat'];
$_SESSION['nombreChat'];

if(isset(
$_GET['start'])){    
    include 
"../forms/frmChat.php";
  
}
else if(isset (
$_POST['enviar'])){
    
    
$_SESSION['mensajesChat']=$_POST['mensaje'];//Aquí falta algo para que funcione bien....
    
$_SESSION['nombreChat']=$_POST['nombre:'];
    include (
'../forms/frmChat.php');
    
}
?>
esta es la clase frmChat
Código HTML:
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>prototipoChat</title>
<link rel="stylesheet"
 href="../themes/skin.css"
 type="text/css">
</head>
<body>
<form method="post" action="../events/eventsFrmChat.php" name="chat">
<table style="text-align: left; width: 312px; height: 311px;"
border="1" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td colspan="2" rowspan="1" style="vertical-align: top;"><textarea readonly
cols="40" rows="15" name="chatText"> <?php echo $_SESSION['nombreChat'].$_SESSION['mensajesChat'] ?></textarea><br>
</td>
</tr>
<tr>
<td style="vertical-align: top;">Nombre:</td>
<td style="vertical-align: top;"><input name="nombre:" value="" type="text"><br>
</td>
</tr>
<tr>
<td style="vertical-align: top;">Mensaje:<br>
</td>
<td style="vertical-align: top;"><input name="mensaje" value="" type="text"><br>
</td>
</tr>
<tr>
<td style="vertical-align: top;"><br>
</td>
<td style="vertical-align: top;"><input name="enviar"
value="Enviar" type="submit"> <br>
</td>
</tr>
</tbody>
</table>
<br>
</form>
<br>
</body>
</html> 
el problema es que al enviar el mensaje el nombre o el nick del usuario no me coloca dos puntos ejemplo :
juan:hola

y lo otro es que necesito que se me actualize los mensajes que cada usuario envia pues lo que hace es que me reemplaza sobre otro mensaje

bueno espero que me puedan ayudar

aqui en este link esta completo el proyecto http://www.megaupload.com/?d=LEHK722P preferiblemente usen jdownloader es que directo hay un problema

gracias