For the <? problem, you'd have to turn on short_open_tag either in the php.ini file (if you're allowed) or via a .htaccess file (if on Apache and allowed to). Really the better solution would be to change all the short tags in your code to full <?php tags, as there can be some issues with short_open_tags enabled (specifically: confusion between PHP opening tags and XML declaration tags).
For the DB security stuff, you should create a DB user who only has the bare minimum of permissions to do what needs to be done in your scripts, e.g.: only give it access to the necessary table(s) with SELECT, UPDATE, and INSERT privileges; then use that userID for your script's mysql connection. See http://dev.mysql.com/doc/refman/4.1/en/privilege-system.html for lots more info.