I am trying to set a session variable for EmplID which should be pulled from the query below. I think that I'm doing it right but can someone tell me how to echo it correctly so I can see if it is setting the correct thing? The other two session variables that I set at the bottom seem to work fine. Thanks.
$sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'";
$result=mysql_query($sql);
// Mysql_num_row is counting table row
$count=mysql_num_rows($result);
// If result matched $myusername and $mypassword, table row must be 1 row
// Trying to create a session variable for the employeeID
$_SESSION['EMPID']=$result['EMPID'];
if($count==1){
// Register $myusername, $mypassword and redirect to file "login_success.php"
session_register("myusername");
session_register("mypassword");