The code itself will need to be in a custom template I made, following a form submission. It retrieves $_POST variables, queries the db for some data, and then outputs the results. I added my script into profile.php, specifically. What I need to do is transfer the variable containing the query results and be able to use it in the custom template.