Kimble
Erfahrenes Mitglied
hi,
wie kann ich - also : ) - abfangen und das durch eine Grafik erstezn. Also nicht, wie bei dem GB weiter unten.
Soll in mySQL sein.
Hier mein Code:
Hat jemand sowas schonmal gemacht???
Bitte helft!
wie kann ich - also : ) - abfangen und das durch eine Grafik erstezn. Also nicht, wie bei dem GB weiter unten.
Soll in mySQL sein.
Hier mein Code:
PHP:
<html>
<head><title>show-news</title>
<!-- CSS Begin //-->
<style type="text/css">
<!--
table { font-family: helvetica, arial, geneva, sans-serif; font-size: 10pt; background: #FFFFFF; }
td.left { font-family: helvetica, arial, geneva, sans-serif; font-size: 10pt; background: #CCCCCC; word-break: break-all; word-wrap: break-word; }
td.right { font-family: helvetica, arial, geneva, sans-serif; font-size: 10pt; background: #DDDDDD; word-break: break-all; word-wrap: break-word; }
td.edit { font-family: helvetica, arial, geneva, sans-serif; font-size: 10pt; background: #CCCCCC; word-break: break-all; word-wrap: break-word; }
//-->
</style>
<!-- CSS End //-->
<!-- Show NEWS PHP Begin //-->
<?php
# include aller wichtigen Dateien
include "includes/mysql.connect.inc";
include "includes/mysql.close.inc";
# zu Datenbank connecten
# host, user, pw, db
sqlconnect( "localhost", "xxx", "xxx", "clan" );
$res = mysql_db_query( "clan", "SELECT * FROM news" );
$num = mysql_num_rows( $res );
if( $num == 0 )
{
echo "No news in database!";
}
for( $i=0; $i<$num; $i++ )
{
$cb = mysql_result( $res, $i, "createdby" );
$tc = mysql_result( $res, $i, "topic" );
$in = mysql_result( $res, $i, "inhalt" );
$dt = mysql_result( $res, $i, "date" );
$ti = mysql_result( $res, $i, "time" );
$co = mysql_result( $res, $i, "comments" );
// echo "$cb, $tc, $in, $dt, $ti, $co";
echo "<table border=\"0\" width=\"570\">";
echo "<tr><td align=\"left\" class=\"left\" width=\"100\"> Creator:</td>"
. "<td align=\"left\" class=\"right\"> $cb</td>"
. "<td align=\"center\" class=\"edit\" width=\"50\">Edit</td>"
. "<td align=\"center\" class=\"edit\" width=\"60\">Delete</td></tr>";
echo "<tr><td align=\"left\" class=\"left\" width=\"100\"> Date:</td>"
. "<td align=\"left\" class=\"right\"> $dt</td>"
. "<td align=\"center\" class=\"edit\" width=\"50\">Edit</td>"
. "<td align=\"center\" class=\"edit\" width=\"60\">Delete</td></tr>";
echo "<tr><td align=\"left\" class=\"left\" width=\"100\"> Time:</td>"
. "<td align=\"left\" class=\"right\"> $ti</td>"
. "<td align=\"center\" class=\"edit\" width=\"50\">Edit</td>"
. "<td align=\"center\" class=\"edit\" width=\"60\">Delete</td></tr>";
echo "<tr><td align=\"left\" class=\"left\" width=\"100\"> Comments:</td>"
. "<td align=\"left\" class=\"right\"> $co</td>"
. "<td align=\"center\" class=\"edit\" width=\"50\">Edit</td>"
. "<td align=\"center\" class=\"edit\" width=\"60\">Delete</td></tr>";
echo "<tr><td align=\"left\" class=\"left\" width=\"100\"> Topic:</td>"
. "<td align=\"left\" class=\"right\"> $tc</td>"
. "<td align=\"center\" class=\"edit\" width=\"50\">Edit</td>"
. "<td align=\"center\" class=\"edit\" width=\"60\">Delete</td></tr>";
echo "<tr><td align=\"left\" class=\"left\" width=\"100\"> Content:</td>"
. "<td align=\"left\" class=\"right\"> $in</td>"
. "<td align=\"center\" class=\"edit\" width=\"50\">Edit</td>"
. "<td align=\"center\" class=\"edit\" width=\"60\">Delete</td></tr>";
echo "</table><br>";
}
# Datenbank schliessen
sqlclose( );
?>
<!-- Show NEWS PHP End //-->
</head>
<body bgcolor="#ffffff">
</body>
</html>
Hat jemand sowas schonmal gemacht???
Bitte helft!
Zuletzt bearbeitet: