Question
Error message Can't use function return value in write context
I keep getting the "Can't use function return value in write
context" error when I try to pull a dataset from a MySQL database
using a form-variable from a previous page. I've spent days digging
through webposts and a Php and MySql reference book trying to
understand what's going wrong and I'm getting nowhere.
The error message references line 33. What I want to happen is on a previous page a person selected themselves from a dynamic list and it set the value of varDirector to their ID in a table of Directors. That number is passed as a form variable to the page where the error occurs (see code below). The SQL query runs when I test but then when I upload the pages and try to run I get the error. Is it something to do with whether the variable is a number or text string?
Thanks for any help.
The error message references line 33. What I want to happen is on a previous page a person selected themselves from a dynamic list and it set the value of varDirector to their ID in a table of Directors. That number is passed as a form variable to the page where the error occurs (see code below). The SQL query runs when I test but then when I upload the pages and try to run I get the error. Is it something to do with whether the variable is a number or text string?
Thanks for any help.
