PHP script to do inserts and reads from mySQL