At 26.03.2002  14:44, you wrote:
>I wasn't so much concearned about security of users grabbin pics. I am
>more trying to learn how these people load there menus dynamically and
>pics dynamically. Do you have any links to pages or code that describe how
>to make a link in the db to pics on my filesystem?

I cannot help you with code,also it wouldnīt really help you understanding 
the problem
but give you more problems understanding my code.
I use to have a table with the following structure
rn      // thatīs an autoincrement number for indexing
page // on which page the component will appear "foobar.php3"
pt      // path to the pic (depending of quantity of path) "../pix/"
nop // the name of the pic "foo.jpg"
altval  // the word which will be shown in the alt tag of the pics 
reference "This is the foopic"
link    // where will the link go "newfoo.php"
orm     // a number to order the
sf      // showflag, to switch off unwanted/uncompleted pages

For pathinformations, I use an includefile which is included on every page.
This holds the informations about tablewidth, pathes(oops thatīs correct?), 
and everything the Site needs on every page.

Now you just make a select like
select * from menu where page="$PHP_SELF" where sf=1 order by orm
And make your menu. If you put the menu in an extra page (or an object)
you just have to include it on every "content page" and the work is done.
echo '<table border="0" width="'.$tbwidth.'" cellpadding="0" 
cellspacing="0" summary="Menutable">'
while($res=answer from db)
         echo '<tr><td>'
         echo '<a href="'.$res[5].'?somevar=something">'
         echo '<img src="$res[2]" border="0" width="XX" height="YY" 
         echo '</a></td></tr>'
echo '</table>'

As you said you want to make a menu, width & height of the pics are known.
Otherwise you shoul check them using fuctions from the graphic library.
The Browsers are faster if they know exactly what the do.
Maybe this gives you some understanding how to do it.
(sorry all trailing ; are missing. Itīs early today)

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to