Update newpost.php

Re-wrote a lot of newpost.php in order to properly seperate database query code, connection code and insert code into 3 seperate functions called Conn(); QueryDatabase($query); and inserImage($firstName,$lastName,$age); These functions can be used together to insert an entry into the table imgbattle.