sorry, i probably didnt provide enough info. below is a snip of the more important parts of the script....
the string stored in the database is u$er.
snip
$return1 = mysql_fetch_array($result1);
$enpass = $return1[9];
snip
$enpass1 = $enpass . "\n";
socket_write( $socket, $enpass1, strlen( $enpass1 ) );
$enpass contains a string with a $ in it, as described above. From what i can tell, this charactor is causing everything to break, but i've no idea how to work around it in this instance.