hey there,
i hope someone can help me. i builded a simple page (see code below) and after a certain time i get 500 server errors, then i have to restart the server. my hoster isnt doesnt want to help or isnt able...
where is my mistake?
--- popis
<?php
$db = odbc_connect("[dsn]","","","");
$sql = ("
SELECT *
FROM [table]
WHERE status = 1
AND exp >= now()
AND datum <= now ()
ORDER BY datum desc
")
or die('Verbindung fehlgeschlagen.');
$res = odbc_exec($db, $sql);
$row_num = 1; $row = array();
?>
<span class="footer">Datum: <?php print date("d.m.Y", strtotime ("now"));?></span><br>
<br>
<table border="0">
<?php
while(odbc_fetch_row($res)){
$name=odbc_result($res,2);
$datum=date("d.m.Y",strtotime(odbc_result($res,3)));
$atext=odbc_result($res,5);
$link=odbc_result($res,7);
?>
<tr>
<td valign="top" nowrap>
<span class="highlight"> <?php print $datum?></span></td>
<td> </td>
<td valign="top" width="350"><b><?php print $name?></b><br>
<?php print $atext?><br>
<?php if ($link != 0){?>
<span class="footer"><a href="<?php print
$link?>">Details...</a></span>
<?php };?>
</td>
</tr>
<?php
}
?>
</table>
</BODY>
<?php
odbc_close($db);
odbc_free_result($res);
unset($res, $name, $datum, $atext, $link);
?>