Interface gibt nichts aus?

progfxler

Gesperrt
PHP:
<? 
require("config.inc.php");
mysql_connect($sqlhost,$sqluser,$sqlpass) OR DIE( "Couldn't connect to MySQL server!"); 
mysql_select_db($database); 
 
$result = mysql_query("SELECT * FROM history");

while ($data = mysql_fetch_array($result)) { 

 $data[history] = str_replace("\n", "<BR>", $data[history]);
 $data[history] = str_replace("[ /b ]", "</b>", $data[history]); 
 $data[history] = str_replace("[ b ]", "<b>", $data[history]); 
 
?>
<?php
if ($action == "" || $action=="all"){
?><table width="584" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td width="13">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="584" border="0" cellspacing="0" cellpadding="0" height="1">
  <tr> 
    <td> 
      <div align="right"><img src="files/member_oben.gif" width="571" height="1"></div>
    </td>
  </tr>
</table>
<table width="584" border="0" cellspacing="0" cellpadding="0" height="8">
  <tr> 
    <td width="20">&nbsp; </td>
    <td width="560"> 
      <form method="POST" action="historyadmin.php?action=update" name="REPLIER">
        <table width="571" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr> 
          <td background="files/member_mitte.gif"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="2%"><b><font face="Verdana" color="#CCCCCC" size="1"><img width="1" height="1"></font></b></td>
                <td width="98%"> <b><font face="Verdana" color="#CCCCCC" size="1"><img width="1" height="4"> 
                  </font></b> </td>
              </tr>
              <tr> 
                <td width="2%">&nbsp;</td>
                  <td width="98%">
                    <div align="center"><b><font face="Verdana" color="#CCCCCC" size="1"> 
                      
                    <textarea name="history" cols="100" rows="25"><? echo $data[history]; ?></textarea>
                      <br>
                      
                    
                  <input type="submit" name="Submit" value="edit">
                      </font></b></div>
                  </td>
              </tr>
			      </form>
            </table>
          <table width="584" border="0" cellspacing="0" cellpadding="0" height="1">
  <tr> 
    <td> 
      <div align="right"><img src="files/member_oben.gif" width="571" height="1"></div>
    </td>
  </tr>
</table>
<table width="8" border="0" cellspacing="0" cellpadding="0" height="8">
  <tr> 
    <td>&nbsp;</td>
  </tr>
</table>
<? 
}
elseif ($action =="update")
{

$wahl = mysql_query("UPDATE history SET history='$history'");

?>

<font size="1" color="#CCCCCC"><b><font face="Verdana, Arial, Helvetica, sans-serif">History erfolgreich geändert![<A href='index.php?site=admin'>aktualisieren!</A>]</font></b></font><font color="#CCCCCC" face="Verdana, Arial, Helvetica, sans-serif" size="1"> 
<? }} ?>
</font>

Wieso erscheint nichts wenn ich das in eine Datei reinkopiere?
 
eine history tabelle mit folgenden untertabellen hab ich auch schon erstellt

id: int(11) | Null: Nein | auto_increment | Primärschlüssel | Index | Unique
history: text | Null: Nein
 
löst zwar nicht dein problem aber ...

es ist nie eine gute idee das tabellen und felder gleiche namen haben ...
 
Eventuell erscheint nix, weil du

1) der Datei keine php Endung gegeben hast
2) die Datei nicht auf einem Webserver + PHP Modul ausführst
3) der Datei die Variable $action nicht übergibst
4) wat weiss ich was...
:rolleyes:
 
Zurück