You are here: Re: [PHP] GET variables and mySQL functions inside an Image header. « PHP « IT news, forums, messages
Re: [PHP] GET variables and mySQL functions inside an Image header.

Posted by David Tulloh on 10/10/05 10:00

Kristopher Kane wrote:

>I am currently in Afghanistan and don't have much access to look these
>questions up. I consider them basic and regret having to post them here.
> When passing variables using GET as in:
>index.php?first=value?second=value
>My script is reading the first value, however through an included file and
>another function, it can't read the second. What scope do these variables
>have? Or what other reasons for not being able to read the variables might
>there be?
>
>
Your GET syntax is wrong, you should be using:

index.php?first=value&second=value

The way you were doing it you should see the second variable contained within the first value.



> Second:
> When dynamcially creating an image:
>I am drawing an image based on data retreived from a mySQL resource.
>However, my DB code is in the same file as the php image file and I get the
>non-descriptive error of "Error in the image 'url'" Are you allowed to do
>any other functions inside an image header other than image functions?
>(Functions being; open a connection to mySQL and do queries)
> Thank you for your help,
> -Kristopher Kane
>
>
>

You can use any valid PHP code before or after sending an image header
so long as you don't inadvertantly output to the browser. I am not sure
what that error message means though, I'm sure someone who uses the
image functions more frequently could give you some clues.


David

 

Navigation:

[Reply to this 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

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