Hi,
Can anyone help me to get my query printed when I parse ID.
Here is the code:
[snip]
FILE: udskriv.php
<?php
include("connect.php");
mysql_select_db("DATABASE");
$result = mysql_query("SELECT ID, tekst, DATE_FORMAT(dato, '%d %m %Y
kl. %H:%i')as dato FROM TABLE ORDER BY ID desc LIMIT 0,3");
while ($raekke = mysql_fetch_array($result)){
echo"<P>Indtastet dato: ".$raekke['dato']."</P>";
$text = $raekke['tekst'];
echo nl2br(substr($text,0,50));
print "<a href='showpost.php?ID={$raekke["ID"]}'>Some Text</a>";
}
mysql_close($link);
?>
FILE: showpost.php
<?php
include("connect.php");
$ID = $_POST['ID'];
$sql = "SELECT tekst FROM TABLE WHERE ID=$ID";
$result = mysql_query($sql);
echo "her er:".$result;
mysql_close($link);
?>
[snip]
The problem is that I don't get any output from the database. Why?
Ricki