Hi Mike, I would suggest that you look for [A-Z],[a-z] and [0-9] characters and build up your string for Media ID instead of replacing "\r" and "\n". I have gone through the same situation for bar code scanning. Regards, Manjiri __________________________________ Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search. http://info.mail.yahoo.com/mail_250 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php