The logic is half right, but you are overwriting the enteredNumber with that of the median which is backwards. Its easier than this though, with only 3 numbers:
PHP Code:
if (enteredNumber > max)
{
median = max;
max = enteredNumber;
}
else if (enteredNumber < min)
{
median = min;
min = enteredNumber;
}
else
{
median = enteredNumber;
}
If you can't use if/elseif, then the logic of if/elseif/else is identical to if/else(if/else).
Also, in the future please select a title that better describes the issue you are having.