The query below is on a page where there is only one value for $submissionid. Thus, the field points has only one value.
How can I turn the points from the query below into a regular PHP variable?
$sqlStra = "SELECT points, submissionid
FROM submission
WHERE submissionid = '$submissionid'";
EDIT: This is pulling from a MySQL database.
EDIT II: I want to points to equal a variable on the entire page, not just inside of a while loop.
I would use an ORM library (I use the one that comes bundled with Kohana) to eliminate the possibility of SQL injections. However, assuming a database connection is already established, this code will do what you are looking for.
If you don’t have a MySQL database connection established, check out mysql_connect.