Mailinglisten-Archive |
This is a multi-part message in MIME format. ------=_NextPart_000_001C_01C0068E.158738C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Hier sind noch die Files. > Hallo Liste > > Ich [Oliver Flückiger, 15 Jahre] arbeite beim Internet-Chalenge ThinkQuest > [www.thinkquest.org] mit. Heute abend ist da Abgabeschluss, und mein > datenbankbasierter Chatroom funktioniert immer noch nicht. > Das problem ist folgendes: > PHP gibt keinen Feher aus [auch nicht mit mysql_error()], aber es wird auch > nichts in die Datenbank geschrieben oder ausgelesen. > > Kann mit jemand helfen? > > Vielen Dank > > Oliver > PS: Ich muss jetzt zur Schule, und ab 12:00 Noon Eastern Time (USA) kann ich > nichts mehr auf den Server laden. > Es wäre sehr nett, wenn jemand Zeit und Lust hätte, bis dahin den Chat zu > "reparieren". Ich würde mich dann > selbstverständlich erkenntlich zeigen. > > > -- > ** Durchgehend geöffnet: http://www.php-center.de ** > Die PHP-Liste: mailto:php_(at)_php-center.de > http://infosoc.uni-koeln.de/mailman/listinfo/php > ------=_NextPart_000_001C_01C0068E.158738C0 Content-Type: application/octet-stream; name="output.php3" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="output.php3" <?php=0D =0D mysql_pconnect("mysqldb.thinkquest.org","C001495","33t3h289");=0D mysql_select_db("C001495");=0D $textanweisung=3Dmysql_query("SELECT text FROM chat WHERE = tonick=3D'$nickname' OR tonick=3D'all'");=0D while($zeile=3Dmysql_fetch_array($textanweisung)) {=0D $text=3D$zeile["text"];=0D }=0D ?>=0D =0D <html>=0D <head>=0D <title>output</title>=0D <meta http-equiv=3D"Content-Type" content=3D"text/html; = charset=3Diso-8859-1">=0D <meta http-equiv=3D"refresh" content=3D"10">=0D <style type=3D"text/css">=0D <!--=0D .normal { font-family: Verdana, Arial, Helvetica, sans-serif; = font-size: 10pt; font-weight: bold; color: #FFFFFF; text-decoration: = none}=0D .cry { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: = 12pt; font-weight: bold; color: #FFFFFF; text-decoration: underline}=0D .to { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: = 14pt; color: #FFFF33; text-decoration: blink}=0D .ask { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: = 10pt; color: #FFFFFF; background-color: #FF6600}=0D -->=0D </style>=0D </head>=0D =0D <body bgcolor=3D"#660000">=0D <?php=0D echo ($zeile);=0D ?> =0D </body>=0D </html>=0D ------=_NextPart_000_001C_01C0068E.158738C0 Content-Type: application/octet-stream; name="input.php3" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="input.php3" <?php=0D $welcomemsg=3D"Welcome in our expert.chat! <br> Chat now at Apeiron! = <br> Regards, <br> The Apeiron Team C001495";=0D mysql_pconnect("mysqldb.thinkquest.org","C001495","33t3h289"); =0D mysql_select_db("C001495"); =0D =0D if ($sent=3D=3Dnull) =0D { //Der User hat noch nichts geschrieben, d.h. sich erst = gerade in den Chat eingeloggt=0D $hidden =3D null; // 10=0D mysql_query("INSERT INTO chat (nickname, text) VALUES ('$nickname' ,=0D '$welcomemsg')"); } =0D else =0D {=0D if ($add=3D=3Dnull) =0D {=0D $query=3Dnull; //$query muss leer sein, da niemand = hinzugef=FCgt werden muss.=0D } =0D elseif ($sent=3D=3D1 || $text && null) {=0D //Wurde etwas abgeschickt [mit $sent =FCberpr=FCfen] und $text ist = nicht null 20=0D if ($option=3D=3Dsay) =0D { //hat der User etwas gesagt?=0D $timeanweisung=3Dmysql_query("SELECT saytime FROM chat WHERE = nickname=3D'$nickname' AND WHERE text=3D'$text'");=0D while($data=3Dmysql_fetch_array($timeanweisung)) =0D { =0D $saytime =3D $data[0]; =0D }=0D $text=3D"<a class=3D\"normal\">$nickname say at $saytime = \"$text\"</a><hr>";=0D mysql_query("INSERT INTO chat (tonick, saytime) VALUES ('$to' , = 'time(Y-m-d)')");=0D } //30=0D elseif ($option=3D=3Dcry) =0D { //hat der User geschriehen?=0D $timeanweisung=3Dmysql_query("SELECT saytime FROM chat WHERE = nickname=3D'$nickname' AND WHERE text=3D'$text'");=0D while($data=3Dmysql_fetch_array($timeanweisung))=0D { =0D $saytime =3D $data[0]; =0D }=0D $text=3D"<a class=3D\"cry\">$nickname cry at $saytime = \"$text\"</a><hr>";=0D mysql_query("INSERT INTO chat (tonick, saytime) VALUES ('$to' , = 'time(Y-m-d)')");=0D } //40=0D elseif ($option=3D=3Dask) =0D { //hat der User etwas gefragt?=0D $timeanweisung=3Dmysql_query("SELECT saytime FROM chat WHERE = nickname=3D'$nickname' AND WHERE text=3D'$text'");=0D while($data=3Dmysql_fetch_array($timeanweisung))=0D { =0D $saytime =3D $data[0]; =0D }=0D $text=3D"<a class=3D\"normal\">$nickname say at $saytime = \"$text\"</a><hr>";=0D mysql_query("INSERT INTO chat (tonick, saytime) VALUES ('$to' , = 'time(Y-m-d)')");=0D } =0D elseif ($option=3D=3Daway) =0D { //geht der User weg?=0D $timeanweisung=3Dmysql_query("SELECT saytime FROM chat WHERE = nickname=3D'$nickname' AND WHERE text=3D'$text'");=0D while($data=3Dmysql_fetch_array($timeanweisung))=0D { =0D $saytime =3D $data[0]; =0D }=0D $text=3D"<a class=3D\"normal\">$nickname go away at $saytime = \"$text\"</a><hr>";=0D mysql_query("INSERT INTO chat (tonick, saytime) VALUES ('$to' , = 'time(Y-m-d)')");=0D } =0D elseif ($option=3D=3Dlogout) =0D { //loggt sich der User aus?=0D $timeanweisung=3Dmysql_query("SELECT saytime FROM chat WHERE = nickname=3D'$nickname' AND WHERE text=3D'$text'");=0D while($data=3Dmysql_fetch_array($timeanweisung))=0D { =0D $saytime =3D $data[0]; =0D } =0D $text=3D"<a class=3D\"normal\">$nickname has logged out at $saytime = \"$text\"</a><hr>";=0D mysql_query("INSERT INTO chat (tonick, saytime) VALUES ('$to' , = 'time(Y-m-d)')");=0D }=0D }=0D else =0D {=0D $newnickname =3D "<option value=3D\"$to\" selected>$to</option>";=0D $result =3D mysql_query("SELECT * FROM chat WHERE=0D nickname=3D'$nickname");=0D while($data=3Dmysql_fetch_array($result))=0D {=0D $nicknameold=3D$data["nickname"];=0D } $nicknameold .=3D $newnickname; =0D mysql_query("UPDATE chat SET to=3D'$nicknameold' = WHERE=0D nickname=3D'$nickname'");=0D } =0D }=0D ?>=0D <html>=0D <head>=0D <title>input</title>=0D <meta http-equiv=3D"Content-Type"=0D content=3D"text/html; charset=3Diso-8859-1">=0D <style type=3D"text/css">=0D <!--=0D .normal { font-family: Verdana, Arial, Helvetica, sans-serif; = font-size:=0D 10pt; font-weight: bold; color: #FFFFFF; text-decoration: none}=0D .cry { =0D font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt;=0D font-weight: bold; color: #FFFFFF; text-decoration: underline}=0D .to { =0D font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14pt; = color:=0D #FFFF33; text-decoration: blink}=0D .ask { font-family: Verdana, Arial,=0D Helvetica, sans-serif; font-size: 10pt; color: #FFFFFF; = background-color:=0D #FF6600}=0D -->=0D </style>=0D </head>=0D =0D =0D <body bgcolor=3D"#660000">=0D <span=0D class=3D"normal"></span> =0D <form method=3D"post" action=3D"input.php3">=0D <input=0D type=3D"hidden" name=3D"sent" value=3D"yes">=0D <table width=3D"25%"=0D background=3D"images/chat.gif" border=3D"0" cellspacing=3D"0" = cellpadding=3D"0">=0D =0D <tr> =0D <td width=3D"28%" height=3D"121" class=3D"normal"> =0D <table=0D width=3D"241" border=3D"0" cellspacing=3D"0" cellpadding=3D"0">=0D <tr>=0D =0D <td class=3D"normal" width=3D"56">I want</td>=0D <td width=3D"185">=0D <select name=3D"option">=0D <option value=3D"say"=0D selected>say</option>=0D <option value=3D"cry">cry</option>=0D =0D <option value=3D"ask">ask</option>=0D <option=0D value=3D"away">go away</option>=0D <option=0D value=3D"logout">logout</option>=0D </select>=0D </td>=0D =0D </tr>=0D <tr> =0D <td class=3D"normal" width=3D"56">this=0D text </td>=0D <td width=3D"185"> =0D <input type=3D"text"=0D name=3D"text" class=3D"normal">=0D </td>=0D </tr>=0D =0D <tr> =0D <td class=3D"normal" width=3D"56">to </td>=0D <td=0D width=3D"185"> =0D <select name=3D"to" class=3D"normal">=0D =0D <option value=3D"<?php echo $nickname; ?>"><?php echo $nickname; = ?></option>=0D <option=0D value=3D"all">all</option>=0D </select>=0D </td>=0D =0D </tr>=0D </table>=0D =0D </td>=0D </tr>=0D </table>=0D </form>=0D </body>=0D </html>=0D ------=_NextPart_000_001C_01C0068E.158738C0 Content-Type: application/octet-stream; name="online.php3" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="online.php3" <?php $dbhost=3D"mysqldb.thinkquest.org"; $dbuser=3D"C001495"; $dbpassword=3D"33t3h289"; $dbname=3D"C001495"; mysql_pconnect($dbhost,$dbuser,$dbpassword);=20 mysql_select_db($dbname);=20 $aw=3D"SELECT COUNT(id) AS max FROM chat"; $qw=3Dmysql_query($aw); while($xa=3Dmysql_fetch_array($qw)) { $x=3D$xa["id"]; //10 } $forward=3D""; $back=3D""; if(isset($pos)=3D=3D0) { $pos=3D0; $count=3D20; } if ($beschreibung=3D=3D"null") //20 { //ist keine Beschreibung verlangt? $query=3D"SELECT nickname FROM 'chat' LIMIT $pos,$count"; $anweisung=3Dmysql_query($query); while($zeile=3Dmysql_fetch_array($anweisung))=20 { $link=3D"<a href=3D\"online.php3?beschreibung=3D$zeile&pos=3D$pos\" = style=3D\"normal\">$zeile</a>"; } } elseif (!$update=3D=3D"null") { //30 mysql_query("UPDATE chat SET beschreibung=3D'$tb' WHERE = nickname=3D'$nickname'"); $zeile=3D"Your information was been updated. /n The Apeiron Team"; }=20 elseif ($xa > "null") { //wird ein Back-Button ben=F6tigt? $back=3D"<a href=3D\"online.php3pos=3D$pos-$count;\">"; } elseif($xa >=3D $pos+$count) { //wird ein Forward-Button ben=F6tigt? $forward=3D"<a href=3D\"online.php3?pos=3D$pos+$count;\">"; //40 } elseif ($beschreibung=3D=3D$nickname || $update=3D=3D"null") { $query=3D"SELECT beschreibung FROM 'chat' WHERE = nickname=3D'$nickname'"; $anweisung=3Dmysql_query($query); while($zeile=3Dmysql_fetch_array($anweisung)) { $beschreibung=3D$zeile["beschreibung"]; } echo (" <form name=3D\"update\" > <input type=3D\"hidden\" name=3D\"update\" value=3D\"1\"> <input type=3D\"hidden\" name=3D\"nickname\" value=3D\"$beschreibung\"> <p>=20 <textarea name=3D\"tb\" rows=3D\"20\" = cols=3D\"30\">$beschreibung</textarea> <br> <input type=3D\"submit\" name=3D\"update\" value=3D\"update\"> </p> </form>"); } else { //ist eine Beschreibung verlangt? $query=3D"SELECT beschreibung FROM 'chat' WHERE = nickname=3D'$beschreibung'"; //60 $anweisung=3Dmysql_query($query); while($zeile=3Dmysql_fetch_array($anweisung)) { $link=3D"<a href=3D\"online.php3?pos=3D$pos\" = style=3D\"normal\">$zeile</a>"; } ?>Where's online
-
<?php } ?> ------=_NextPart_000_001C_01C0068E.158738C0 Content-Type: application/octet-stream; name="index.php3" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="index.php3"
$title Chat ------=_NextPart_000_001C_01C0068E.158738C0--
php::bar PHP Wiki - Listenarchive