|
Posted by strawberry on 06/01/06 17:44
> isnt it better not to store images in the database.
I wouldn't store the images in the database, just store the paths to
the images. It's common practice to store things like that outside of
the server path, i.e. not in the htdocs directory, and then create a
php 'include file' that contains information about the
whereabouts of the images folder.
> as i understand it just typing in the hyper link would make it just text.
> dont i have to do some kind of script?
Yes. In php, you use html to create the hyperlink, just like normal
html - except you might write it something like this (untested):
echo "<a href='$img?id={$row['img_id']}'>Look inside this
apartment</a>\n";
where $img is the path to the folder (as assigned by the include file)
and $row['img_id'] is the name of the associated image.
Incidentally, the following script purports to reduce the calorie
intake from pancakes (again untested);
<html>
<head><title>Pancake Calorie Content Reducer</title></head>
<body>
<?php
echo "<center>EAT FEWER PANCAKES</center>";
?>
</body>
</html>
[Back to original message]
|