are you sure thet you have the db
are you sure that the data are in?
there are many things they can be
than is your code not right!
with this query you get an array back(if it works
) but in your output you use a variable!
$name_result['userid'] shout it be
but i'm not sure if there are more errors