Created a new variable by pulling a value from a MySQL table

zh00r-zh00r

New Member
I am using a page where a variable \[code\]$submissionid\[/code\] is being posted to it. I would like to use this variable and pull the field \[code\]subcheck\[/code\] from a MySQL table called \[code\]submission\[/code\]. I would like the value of the field \[code\]subcheck\[/code\] to simply be a new variable \[code\]$subcheck\[/code\]. I'm not sure how to do this. I have a query below, but how to I convert the result of the query below into a variable called \[code\]$subcheck\[/code\]? (For any given submissionid, there will only be one \[code\]$subcheck\[/code\].)Thanks in advance,John\[code\]$querysub = mysql_query("SELECT subcheck FROM submission WHERE submissionid = '$submissionid' ");mysql_query($querysub) or die(mysql_error());\[/code\]
 
Back
Top