orkar inte titta...inte direkt inspirerande med en helt _massa_ kod..
ja har ett chat script som ser ut så här....
chat.php
<?
if(!isset($com_username)) {
header("location: start.php");
}
else {
include("include/include.php");
$sql = "SELECT * FROM com_member WHERE username = '$com_username' AND password = '$com_password'";
$que = mysql_query($sql);
while ($rad = mysql_fetch_array($que)) {
$id = $rad["id"];
$namn = $rad["namn"];
$email = $rad["email"];
$username = $rad["username"];
$password = $rad["password"];
$postnummer = $rad["postnummer"];
$ort = $rad["ort"];
$gata = $rad["gata"];
$icq = $rad["icq"];
$mobil = $rad["mobil"];
$tidpunkt = $rad["tidpunkt"];
$datum = $rad["datum"];
}
}
if (isset($putin)) {
include("include/include.php");
if (empty($meddelande_chat)) {
echo"";
}
else {
$tiden = time()-60;
$klockan=time();
$query = mysql_db_query($databas, "DELETE FROM com_chat WHERE datum_chat<$tiden");
$regs = "INSERT INTO com_chat
(namn_chat, meddelande_chat, ip, datum_chat)
VALUES
('$namn', '$meddelande_chat', '$REMOTE_ADDR', '$klockan')";
$seg = mysql_query($regs);
header("location: chat.php");
}}
?>
<html>
<head>
<title>.:SluGGo:. [}För dig:. (http://www.sluggo.tk)</title>
<link rel="stylesheet" href="style/style.css">
<script language="JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
</script>
</head>
<body leftmargin="15" marginwidth="15" marginheight="15" bgcolor="#003366">
<center>
<table width="672" border="0" cellspacing="0" cellpadding="1" bgcolor="#000000">
<tr>
<td>
<tr bgcolor="white">
<td>
<table width="672" border="0" cellspacing="0" cellpadding="2">
<tr>
<td class="txt1" width="86%"><a href="start2.php">Startsida</a>
| <a href="dg.php">Din Gästbook</a>
| <a href="ds.php">Dina Settings</a>
| <a href="dg.php">Din Dagbok</a>
| <a href="forum.php">Forum</a>
| <a href="chat.php">Chat</a>
| <a href="spel.php">Spel</a>
| <a href="log_out.php">Logga Ut</a>
</td>
\</tr\>
\</table\>
\</td\>
\</tr\>
<tr>
<td bgcolor="#000000">
<p></p>
</td>
</tr>
<tr>
<td>
<p></p>
</td>
</tr>
</table>
\<table width="500" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" height="380"\>
\<tr valign="top"\>
\<td\>
\<table width="500" border="0" cellspacing="0" cellpadding="2" height="71"\>
\<tr\>
\<td width="100%" class="txt1" height="59"\>Chat\</td\>
\</tr\>
\</table\>
\<table width="371" border="1" bordercolor="#000000" height="282" frame="chatfonster.php""\>
\<tr\>
\<td bordercolor="#000000"scrolling=yes width="361" height="362"\> \<iframe name="I2" src="skriv.php" width="100%" height="100%" frameborder="0" scrolling="yes"\>sorry
you need: internet exlorer 5+ or netscape navigator 6+ netscape
4\.x doesn´t work!\</iframe\> \</td\>
\</tr\>
\</table\>
\<div id="Layer1" style="position:absolute; width:128px; height:487px; z-index:1; left: 745px; top: 65px"\>\<iframe name="I2" src="cs.html" width="100%" height="100%" frameborder="0"\>sorry
you need: internet exlorer 5+ or netscape navigator 6+ netscape 4.x
doesn´t work!\</iframe\>\</div\>
\<p\> \</p\>
\<p\> \</p\>
\</td\>
\</tr\>
\</table\>
<table width="500" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
<tr valign="top">
<td height="40">Send messages:
<form name="form1" method="post" action="">
<input type="text" size=50"name="meddelande_chat" >
<input type="submit" name="putin" value="Submit">
</form>
</td>
</tr>
<tr>
<td bgcolor="#000000">
<p></p>
</td>
</tr>
<tr bgcolor="white">
<td>
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="txt0"><font color="#666666">Copyright © 2002 Design: <a href="mailto:masterflex_@hotmail.com">Masterflex_</a><br>
</font></td>
</tr>
</table>
</table></center></body>
</html>
Skriv.php
<?
if(!isset($com_username)) {
header("location: start.php");
}
else {
include("include/include.php");
$sql = "SELECT * FROM com_member WHERE username = '$com_username' AND password = '$com_password'";
$que = mysql_query($sql);
while ($rad = mysql_fetch_array($que)) {
$id = $rad["id"];
$namn = $rad["namn"];
$email = $rad["email"];
$username = $rad["username"];
$password = $rad["password"];
$postnummer = $rad["postnummer"];
$ort = $rad["ort"];
$gata = $rad["gata"];
$icq = $rad["icq"];
$mobil = $rad["mobil"];
$tidpunkt = $rad["tidpunkt"];
$datum = $rad["datum"];
}
}
?>
<html>
<head>
<title>.:SluGGo CoMMunity:.</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="tina.css" type="text/css">
<link rel="stylesheet" href="css/tina.css" type="text/css">
</head>
<body bgcolor="#663366" text="#000000" leftmargin="0" topmargin="0" rightmargin="0">
<?
include("include/include.php");
$sqle = "SELECT * FROM com_chat ORDER BY datum_chat";
$quee = mysql_query($sqle);
while ($radss = mysql_fetch_array($quee)) {
$id_chat = $radss["id_chat"];
$namn_chat = $radss["namn_chat"];
$datum_chat = $radss["datum_chat"];
$meddelande_chat = $radss["meddelande_chat"];
$ip = $radss["ip"];
$inl = wordwrap( $meddelande_chat, 50 );
print $namn_chat;
print">>>" ;
print $meddelande_chat;
print "<br>";}?>
</body></html>
men när ja skriver in nåt i rutan och trycker skicka händer inget.... hjälp!!!!!!!!1

