Re: GET variables and mySQL functions inside an Image header.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2005-10-10 at 02:33, 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?

Register globals is set to OFF, which is good unless your script
previously relied on it being set to ON. To access the values use the
super global $_GET:

    $first = isset( $_GET['first'] ) ? $_GET['first'] : '';
    $second = isset( $_GET['second'] ) ? $_GET['second'] : '';

>  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)

Is the error a PHP error or a browser error? You can do any PHP code you
want in an image generating page.

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux