how can i get this code to put any veribles into the standerd $##### format
// generate and execute query
$query = "SELECT level, name, password, email FROM login WHERE name = '$UserName' AND password='$Password'";
$result = mysql_query($query) or die ("Error in query: $query. " . mysql_error());
if(mysql_num_rows($result) > 0) {
// then I guess the username and password was correct, eh?
// Now get the 'level':
$row = mysql_fetch_row($result);
echo $level = $row[0];