when you are getting parse errors, please report the line that the error is happening on. it makes helping you much easier ..
just from looking at it, i say it's your first comment
PHP Code:
# first get a mysql connection as per the FAQ
'#' is not a comment character in php.. use '//'
PHP Code:
// first get a mysql connection as per the FAQ