Get variables from a MySQL database

I know how to get variables from MySQL database to a PHP page, what I don’t know is how to take them from the PHP page and use them in the Spark.