Guys,
I'm building an application, each page of the app has two includes at the very top, an 'ini' type include that includes the 'conn' DB connection and Table selection config (so that each page can access the DB without having to connect each time), the other include is full of functions.
Now I'm writing the first function that interacts with the DB but for some reason, its sparking a...
"Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource"
I've taken the same recordset generating code out of the function and dumped it raw onto one of the pages, and it works fine.
Now if I take the DB connection strings out of the 'ini' include and shove that within the function, all works well.
So I am assuming that for some reason PHP functions can't access variables that are included within another include. Do I have to declare my variables as globals or something?
Bit new to this!
Cheers, Ash