Ask a Question related to PHP Development, Design and Development.
-
Ricki Susic #1
link-question
Hi ( and I'm sorry in advance ),
I have looked in php.net but I can't figure out how it's done.
I want to show a list of the three latest inserted posts in a mysql-table.
The list is meant to be an apertizer and the users have to click on it to
see the whole output from the DB.
How do I make the link to open that exact post?
Here is what is working for now:
<?php
$link = mysql_connect("server", "user", "pass")
or die("Could not connect: " . mysql_error());
print ("Connected successfully");
mysql_select_db("database");
$result = mysql_query("SELECT ID, tekst, DATE_FORMAT(dato, '%d %m %Y
kl. %H:%i')as dato FROM henriks ORDER BY ID desc LIMIT 0,3");
while ($raekke = mysql_fetch_array($result)){
echo"<P> ID: ".$raekke['ID']."<br>";
$text = $raekke['tekst'];
echo"Tekst: ".nl2br(substr($text,0,50))."....";
echo"<BR>Dato: ".$raekke['dato'];
}
?>
Regards Ricki
Ricki Susic Guest
-
web link question
Is there a way to create web links in Acrobat Professional so they open the URL in the default browser? I can only seem to get it to work as a... -
Button Link Question
I've created a button with a jpeg and want to be able to click on it and go to FOX News.com I can't seem to get it to work. How do I link it? ... -
Pop-Up Menu Link Question
Hello guys/gals - Only just started using FW so please go easy on me... Have just created my pop up menu sucessfuly and all works fine. I have my... -
link question
I have developed a home page that is a different fireworks image than the rest of the pages on the site. The rest of the pages on the site will all... -
A link question, a bit OT
Jane To an image <a href="Rose.jpg">Flower</a> To a page <a href="more.html">New Page</a> -
Ricki Susic #2
Re: link-question
Offcourse; it seems obvious. Thank you!>
> Create another php page that expects the ID as a GET variable
> as you loop through your dataset (as per your code snippet) do
> something like the following:
>
> print "<a href='showpost.php?id={$raekke["ID"]}'>Some Text</a>";
>
> Then showpost.php:
Ricki
Ricki Susic Guest



Reply With Quote

