Please forgive me for this question, I am very new to PHP and I can't find the answer to my question anywhere.
Is there anyway to set up php so that once it connects to the server, it will keep the connection open and continue to accept new data until I tell it to close?
You could set up a persistent connection to MySQL:
<?php $dbh = new PDO('mysql:host=localhost;dbname=test', $user, $pass, array(PDO::ATTR_PERSISTENT => true )); ?>
However, persistent connections in a web application can create serious issues. See What are the disadvantages of using persistent connection in PDO topic here on SO for a detailed discussion on persistent database connections.
In MySQL there is no significant overhead associated with creating and closing database connections, so just establish a new connection every time you call your php script.