RE: [PHP-DB] Re: session variable in select query showing picture from database

2009-02-12 Thread Fortuno, Adam
: session variable in select query showing picture from database Still fighting with it... So, these work: $query=SELECT * FROM pic_upload; $query=SELECT * FROM pic_upload WHERE band_id=11; picture is shown on the other page but when adding variable into query it doesn't show the picture on the other

Re: [PHP-DB] Re: session variable in select query showing picture from database

2009-02-12 Thread danaketh
Don't see session_start() in your script. If you work with SESSION, you must have it on the first lines of the file (before any output and work with $_SESSION so it's good to put it on the first lines). And it must be in every file which works with them (except for included files). It should

Re: [PHP-DB] Re: session variable in select query showing picture from database

2009-02-12 Thread chris smith
On Fri, Feb 13, 2009 at 6:01 PM, Mika Jaaksi mika.jaa...@gmail.com wrote: With these: $band_id = $_SESSION['session_var']; echo band_id: . $band_id; $query=SELECT * FROM pic_upload WHERE band_id=$band_id; echo query: . $query; I get these: band_id: 11 query: SELECT * FROM pic_upload