in reply to [untitled node, ID 214828]

I suspect you need to change
print redirect($referring_url&variable=value); ^
to
print redirect($referring_url?variable=value); ^
to get a well-formed URL.