Ich habe voher durch ein formular einen eintrag in meien sql datenbank gemacht...ein wert konnte nit beeinflusst werden....nun soll er aber im nachhinein beeinflusst werden..bzw geädentert werden können....nur irgendwie macht er das net...vielleicht ihr ne ahnung warum nich?
<?php
if(isset($send)==0){
$db=mysql_connect("...") or die ("Verbindung fehlgeschlagen");
mysql_select_db("arzykloo",$db);
$news_SQL="SELECT * FROM news2 where news_frei='n' order by news_datetime DESC LIMIT 0,1";
$news_result=mysql_query($news_SQL);
while($news=mysql_fetch_array($news_result)){
?>
<p><font color="#FFFFFF">news #<?php echo $news['news_ID']; ?></font></p>
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="400" height="43" background="piabove.gif"><table width="400" height="43" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="85"><div align="center"><?php echo $news['news_pic']; ?></div></td>
<td width="315"><div align="center"><?php echo "<center><font color='#FFFFFF' size='4'>" . $news['news_header'] . "</font></center>"; ?></div></td>
</tr>
</table></td>
</tr>
<tr>
<td background="pimid.gif"><div align="center">
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="35"> </td>
<td width="330"><div align="center"><?php echo "<center><font size='2' color='FFFFFF' face='Georgia, Times New Roman, Times, serif'>" . $news['news_main'] . "</font></center>"; ?></div></td>
<td width="35"> </td>
</tr>
</table>
</div></td>
</tr>
<tr>
<td background="pimid.gif">
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="90"><div align="right">
<p> </p>
<p><font color="#FF0000">related links:</font></p>
</div></td>
<td><p> </p><? echo "<font color='#CCCCCC' size='2'><a href='" . $news['news_quellen'] . "' target='_blank'>" . $news['news_beschriftung'] . "</a></font>";?></td>
</table>
</td>
</tr>
<tr>
<td width="400" height="42" background="pidown.gif"><div align="center"><? echo "<font size='2' color='#FF0000'>" . $news['news_poster'] . "</font>";?></div>
</td>
</tr>
</table></td>
</tr>
</table> <? } ?>
<form action=newspup.php method=post>
<p><font color="#FFFFFF">Das Posting Freischalten?</font></p>
<table width="50" border="1" cellspacing="0" cellpadding="0">
<tr>
<td><font color="#FF0000">Ok!</font></td>
<td><font color="#FF0000"><input type="radio" name="news_frei" value="j"></font></td>
</tr>
<tr>
<td><font color="#FF0000">No!</font></td>
<td><font color="#FF0000"><input name="news_frei" type="radio" value="n" checked></font></td>
</tr>
</table>
<p><input type="submit" name="send" value="send"></p></form>
<?php
mysql_close();
} else {
$db=mysql_connect("...") or die ("Verbindung fehlgeschlagen");
mysql_select_db("arzykloo",$db);
$SQL_statement="UPDATE news2 SET news_frei='$news_frei' WHERE news_ID=$news_ID";
/* $SQL_statement="UPDATE news2 SET news_frei=$news_frei WHERE news_ID=$news_ID "; */
$news_result=mysql_query($SQL_statement);
mysql_close();
echo "<font color='#00FF00'>News wurde bearbeitet.</font>";
}
?>
<?php
if(isset($send)==0){
$db=mysql_connect("...") or die ("Verbindung fehlgeschlagen");
mysql_select_db("arzykloo",$db);
$news_SQL="SELECT * FROM news2 where news_frei='n' order by news_datetime DESC LIMIT 0,1";
$news_result=mysql_query($news_SQL);
while($news=mysql_fetch_array($news_result)){
?>
<p><font color="#FFFFFF">news #<?php echo $news['news_ID']; ?></font></p>
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="400" height="43" background="piabove.gif"><table width="400" height="43" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="85"><div align="center"><?php echo $news['news_pic']; ?></div></td>
<td width="315"><div align="center"><?php echo "<center><font color='#FFFFFF' size='4'>" . $news['news_header'] . "</font></center>"; ?></div></td>
</tr>
</table></td>
</tr>
<tr>
<td background="pimid.gif"><div align="center">
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="35"> </td>
<td width="330"><div align="center"><?php echo "<center><font size='2' color='FFFFFF' face='Georgia, Times New Roman, Times, serif'>" . $news['news_main'] . "</font></center>"; ?></div></td>
<td width="35"> </td>
</tr>
</table>
</div></td>
</tr>
<tr>
<td background="pimid.gif">
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="90"><div align="right">
<p> </p>
<p><font color="#FF0000">related links:</font></p>
</div></td>
<td><p> </p><? echo "<font color='#CCCCCC' size='2'><a href='" . $news['news_quellen'] . "' target='_blank'>" . $news['news_beschriftung'] . "</a></font>";?></td>
</table>
</td>
</tr>
<tr>
<td width="400" height="42" background="pidown.gif"><div align="center"><? echo "<font size='2' color='#FF0000'>" . $news['news_poster'] . "</font>";?></div>
</td>
</tr>
</table></td>
</tr>
</table> <? } ?>
<form action=newspup.php method=post>
<p><font color="#FFFFFF">Das Posting Freischalten?</font></p>
<table width="50" border="1" cellspacing="0" cellpadding="0">
<tr>
<td><font color="#FF0000">Ok!</font></td>
<td><font color="#FF0000"><input type="radio" name="news_frei" value="j"></font></td>
</tr>
<tr>
<td><font color="#FF0000">No!</font></td>
<td><font color="#FF0000"><input name="news_frei" type="radio" value="n" checked></font></td>
</tr>
</table>
<p><input type="submit" name="send" value="send"></p></form>
<?php
mysql_close();
} else {
$db=mysql_connect("...") or die ("Verbindung fehlgeschlagen");
mysql_select_db("arzykloo",$db);
$SQL_statement="UPDATE news2 SET news_frei='$news_frei' WHERE news_ID=$news_ID";
/* $SQL_statement="UPDATE news2 SET news_frei=$news_frei WHERE news_ID=$news_ID "; */
$news_result=mysql_query($SQL_statement);
mysql_close();
echo "<font color='#00FF00'>News wurde bearbeitet.</font>";
}
?>
Kommentar