xuriorener
Mitglied
PHP:
<?php session_start (); ?>
<? error_reporting ( E_ALL ); ?>
<link href="http://intie-radio.de/style.css" rel="stylesheet" type="text/css">
<?
$dbname="xxx";
$dbhost="localhost";
$dbuser="xxx";
$dbpass="yyy";
mysql_connect($dbhost,$dbuser,$dbpass);
mysql_select_db($dbname);
function query($my_query)
{
$vargs = array();
$fargs = func_get_args();
foreach($fargs as $key => $arg)
{
$vargs[$key] = mysql_real_escape_string($arg);
}
array_shift($vargs);
$my_query = vsprintf($my_query,$vargs);
if($ret = mysql_query($my_query))
{
return $ret;
}
else
{
return false;
}
}
// UPDATE SQL
$id = $_SESSION["id"];
query("UPDATE members SET sendung = 'Online' WHERE id ='%d'",$id);
if(mysql_affected_rows() > 0)
{
echo "<table width=\"100%\" border=\"0\" cellpadding=\"4\" cellspacing=\"1\" class=\"tborder\">
<tbody>
<tr>
<td align=\"left\" bgcolor=\"#FFFFFF\"><h2 align=\"center\"><a href=\"javascript:window.close()\"></a>Sendeinformation <img src=\"../../mages/infoicon.gif\" width=\"36\" height=\"36\" /></h2>
<p align=\"center\">Du bist nun <img src=\"../../images/onair.gif\" width=\"64\" height=\"16\" /></p></td>
</tr>
</tbody>
<tbody id=\"collapseobj_box_2\">
</tbody>
</table>";
}
else
{
echo "<center><strong><font color=\"red\">Fehler im System ! Bitte benachrichtige einen Administrator!</font></strong></center>";
}
?>
Er führt imma das else aus .. also heißt es ja das er nicht updatet .. was mache ich falsch ?
Danke voraus