How taxing are string concatenations?
Normally insignificant compared to expensive operations like file reads, database queries etc.
Actually, it doesnt make sense to use them the way you do.
You might as well use:
$q = "UPDATE " . TBL_USER . " SET
field1='{$updateObject->Field1}',
field2='{$updateObject->Field2}',
field3='{$updateObject->Field3}',
field4='{$updateObject->Field4}',
...";
Also, if you are concerned about performance, it might be better to use arrays instead of objects to access result sets.
The reason why string concatenation is often used instead of variable interpolation (what we're doing in my example) is that there is a slight speed gain (less string parsing needed).
$q = "UPDATE " . TBL_USER . " SET"
. "field1='" . $updateObject->Field1 . "',"
. "field2='" . $updateObject->Field2 . "',"
. "field3='" . $updateObject->Field3 . "',"
. "field4='" . $updateObject->Field4 . "',"
. "...";
But personally I prefer to use variable interpolation in the case of writing queries.
As far as your header statement: I may be wrong but SERVER HTTP vars can be a problem. If you going to do something like that I would use $SERVER['SERVER_NAME']. Using your example it would be:
I dont recognise vt_dave's error message, but I dont think $SERVER['SERVER_NAME'] improves on $SERVER['HTTP_HOST'], especially since the PHP Manual recommends the latter.
No harm trying, of course.