The way I always store links in the database is in the format of varchar,
but if a file is stored in a mp3 folder to follow your example I would list
it in the database as /mp3/sound.mp3. Then list your code like this:
echo  "<table width=\"90%\" border=1><tr><td>";
echo "Nederlands</td><td>Oostends</td><td>Uitleg</td></tr>";

while ($row=mysql_fetch_array($result))
{
echo "<tr><td>";
echo $row[woord_nl]. "</td><td>"
. $row[woord_ost]. "</td><td>"
. $row[betekenis_nl]. "</td><td>"
. "<a href =\"" .$row[geluid] ."/">link name</a>";
echo "</td></tr>";
}

Hope this hleps and works in your situation,
Josh Thomas
Administrator
RPS Internet Services

-----Original Message-----
From: danny [mailto:[EMAIL PROTECTED]]
Sent: Sunday, August 11, 2002 3:33 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Pictures and sound in MySQL and access via PHP


thank you for your answer

How do you make a link in MySQL?

I tried following code were the field "geluid" contains a link to a mp3
format of field geluid = varchar(250). The problem is that i just get plain
text instead of a link to the MP3. Even better would be to have a button to
clicjk if you want to hear the sound.


echo  "<table width=\"90%\" border=1><tr><td>";
echo "Nederlands</td><td>Oostends</td><td>Uitleg</td></tr>";

while ($row=mysql_fetch_array($result))
{
echo "<tr><td>";
echo $row[woord_nl]. "</td><td>"
. $row[woord_ost]. "</td><td>"
. $row[betekenis_nl]. "</td><td>"
. $row[geluid];
echo "</td></tr>";
}

Danny
Rodolfo Gonzalez <[EMAIL PROTECTED]> schreef in berichtnieuws
[EMAIL PROTECTED]
> On Sat, 10 Aug 2002, lallous wrote:
> > > I'm making a on-line dictionary. I use PHP and a MySQL Database.
> > > Now I want to add audio-streaming (MP3) and pictures (JPG) to the
database
> > > and retrieve it true PHP. Can sombody help me out with a little
>
> If the files are not "secret" or "for members only", you should better
> store them somewhere under your http document tree, and store *only* their
> filenames in the database, then you could provide a link to the file. I
> think this would be the faster. Or if you want to "protect" the files, you
> could place them outside your document tree, and then use fileread or
> something similar to read them. But I'd suggest you to keep only the
> filenames on the database, and store the files in the filesystem, it'd
> better for the performance and integrity of the files.
>
> Good luck.
>
>
>



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to