That's the thing, even if i replace the variable part of the query with something static, the output is null (not even a query output, just null), as if there never was any output (as if it never even executed).
However, if replacing the $field in the query with for example field_11 or field_12, the query is a literal copy/paste from the working script. Like I said, both the query and the parts of the script that process the output are literally taken from a working script.
It seems to have to do with the script being separated, because this code from my old script works perfectly:
$xp = mysql_query("SELECT field_12 FROM data_pfields_content WHERE member_id='" . $userno . "'")
$output2 = mysql_result($xp, 0);
If I were to print $output2
it would give me the value for my user number, set in the cookie it fetches.
EDIT: I just noticed that all the variables defined in dat_commoncode.php do nothing; it's as if they're disappearing...
doesn't yield me the usernumber, and the user/pass/database from the connection details are all empty when trying to print them from inside any of the functions..
Functions not seeing connection details (which should be globally available because all functions need them basically), perhaps?Edited by RevZ - 5/7/11 at 11:16am