here's one issue:
Code:
$xvxsl= "$xval * $slpe";
$yvpxxs= "$yval + $xvxsl";
these don't need double-quotes, because they aren't strings. ""s are used to indicate string literals. (aka thing like "bob" or "the answer is"). you can embed variables in your strings and they'll be replaced by their values, you're doing this already.