The warning at the top of your post indicates that $variables is not an array. Code above that that builds $variables might not be returning anything.
The database error that you are getting is a similar cause of the same problem above.
As for your attempt to use "u2" as a variable will fail because you havent cleaned it first. You must clean all variables you're using.
Call the function you call for u, but replace u with u2.
|