i have created a table to store a random number in and now i need the number that has been stored in the db to equal a variable on the new page.
to get the information out of the db i have used this code
$query = "SELECT random1 FROM random_number";
$result=mysql_query($query);
while($row=mysql_fetch_array($result)){
echo "number is{$row['random1']}";
}
if i wanted the data in the row to set the variable to equl the same number would i write at the bottom instead of of the echo
$rand={$row['random1']};