Reply to Re: Learning php Sql

Your name:

Reply:


Posted by Frankly on 10/04/09 11:50

>
> Instead of storing "http://example.net/images/IMAGE.JPG" in the database
> you may only store te image name "IMAGE.JPG" in the database, then you can
> query the image name from the database and concat it with the hardcoded
> path.
>
> $fullpathofimage="http://example.net/images/" . $row['ImageName'];
>
>
>> As to what I want to do.
>
> I think it's a good option.
>
>
>> I would have to ask your opinions on the subject. which would be better
>> for me at my skill level lol.
>> any recommendations on which way to go would be great.
>
> I would make an include file where I store variables with values for
> things I would have fixed, like the path to the images in this example
>
> ---- includefile.php ----
> <?PHP
> $imagepath="http://example.net/images/";
> ?>
> ---- eof ----
>
> and then you include that file to all your scripts and you have only one
> file where to change the static info.
>
> ---- script1.php ----
> <?PHP
> include_once('includefile.php');
> ...
> ?>
> <img src="<?PHP echo $imagepath.$imagename; ?>">
> ...
> ---- eof ----
>
>
> I hope you get the picture of what I mean, bit late here so my brain is a
> bit slow at the moment.
>
>
> //Aho

i will need to get back to this in a day or 2. the tutorials i have used so
far for php and sql only showed how to get pictures to display in
phpmyadmin. or at least that is all i remember.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация