die variable übergeben.
das script soll eine art cafe sein. bei mir auf dem rechner zuhause läuft es ohne problem nur im netz nicht.
das script soll eine art cafe sein. bei mir auf dem rechner zuhause läuft es ohne problem nur im netz nicht.
PHP Code:
<?
include ("dbconnect.php");
include ("message.inc.php");
echo "<TABLE width=\"400\" border=\"1\" cellpadding=\"1\" cellspacing=\"0\" align=\"center\" valign=\"center\" bordercolor=\"#000066\" bgcolor=#ffffff>
<TR>
<TD align=\"middle\">
<font face=Verdana color=#000099 size=4><b>$MSGC_5 </b></font>
</TD></tr>
<TABLE width=\"400\" border=\"1\" cellpadding=\"1\" cellspacing=\"0\" align=\"center\" valign=\"center\" bordercolor=\"#000066\" bgcolor=#ffffff>
<TR>
<td width=\"50%\" height=\"30\" align=\"middle\"><font face=Verdana color=#000099 size=3>
Einträge auswählen
</TD>
<td width=\"50%\" height=\"30\" align=\"middle\"><font face=Verdana color=#000099 size=3>
Neuer Eintrag
</TD>
</TR>
</TABLE>
</TABLE>";
$db = mysql_connect($host,$user,$password);
mysql_select_db($database,$db) or die ("Keine Verbindung zur Datenbank. Überprüfen Sie Ihre Einstellungen in der dbconnect.php!");
$result=mysql_query("select * from $table1 order by cat");
while ($daten =@mysql_fetch_array($result)) {
?><TABLE width="400" border="1" cellpadding="1" cellspacing="0" align="center" valign="center" bordercolor="#000066" bgcolor=#ededed>
<tr><td valign="center"><font face=Verdana color=#000099 size=1 width="50%">
<? echo "<a href=\"cafe.php?kat={$daten['catid']}&liste=".urlencode($daten['cat'])."\" target=_self><center>{$daten['cat']}"; ?>
<td><font face=Verdana color=#000099 size=1 width="50%">
<? echo "<a href=\"eingabe.php?kat={$daten['catid']}&liste=".urlencode($daten['cat'])."\" target=_self><center>{$daten['cat']}"; ?></TD></font></tr>
</TABLE><? } ?>
<form action="<?php $_SERVER['PHP_SELF'] ?>" method="get">
<TABLE width="400" border="1" cellpadding="1" cellspacing="0" align="center" valign="center" bordercolor="#000066" bgcolor=#ffffff>
<tr>
<td align="middle" width="100"><font face=Verdana color=#000099 size=1> Kategorie <?php print $_GET[kat];?> </font></td>
<td align="middle" width="100" height="30"><input type="text" name="catid" size="10" maxlength="5" VALUE="<?php print $_GET[kat];?>" ></td>
<td align="middle" width="100" height="30"><input type="Submit" name="zeige" value="Senden"></td>
</tr>
</table>
</form>
<br><br>
<?php
$verb = mysql_connect($host,$user,$password);
if(!$verb)
die ("Keine Verbindung zu MySQL");
mysql_select_db($database,$verb)
or die ("Keine Verbindung zur Datenbank \"$database\": ".mysql_error() );
if(isset($_GET['zeige']))
$select=mysql_query("select * from $table where catid=$_GET[catid]",$verb);
$anz_reihen = @mysql_num_rows($select);
if ( empty($anz_reihen))
die ("<strong><center>Kein Eintrag vorhanden</strong> "/*.mysql_error()*/);
while ($daten = @mysql_fetch_array($select)) {
echo "<TABLE width=\"300\" border=\"1\" cellpadding=\"1\" cellspacing=\"0\" align=\"center\" valign=\"center\" bordercolor=\"#000066\" bgcolor=#ffffff>
<tr><td align=\"middle\" width=\"100\"><a href=\"artikel.php?id=$daten[id]\" style=\"text-decoration: none;\"><font face=Verdana color=#000099 size=1> $daten[username]</font></a></td>
<td align=\"middle\" width=\"200\" height=\"30\"><font face=arial size=2><font face=arial size=1>
Eingetragen am: $daten[heute]</font><b><br> $daten[beschreibung] </b></font></td>
</tr>
<br>
</table>\n\n";
}
?><br><br><TABLE width="300" border="1" cellpadding="1" cellspacing="0" align="center" valign="center" bordercolor="#000066" bgcolor=#ffffff>
<tr><td valign="center"><font face=Verdana color=#000099 size=2> Nachricht eintragen </td></tr>
</TABLE>
<?
$db = mysql_connect($host,$user,$password);
mysql_select_db($database,$db) or die ("Keine Verbindung zur Datenbank. Überprüfen Sie Ihre Einstellungen in der dbconnect.php!");
$result=mysql_query("select * from $table1 order by cat");
while ($daten =@mysql_fetch_array($result)) {
?><TABLE width="300" border="1" cellpadding="1" cellspacing="0" align="center" valign="center" bordercolor="#000066" bgcolor=#ededed>
<tr><td valign="center"><font face=Verdana color=#000099 size=2>
<? echo "<a href=eingabe.php?kat=$daten[catid]&liste=urlencode($daten[cat]) target=_self><center>$daten[cat]";?>
</tr>
</TABLE><? } ?>
Comment