okay, some issues:
you closed your <title> with </table>
echo'ing large strings best with echo 'blabla'
php will parse it faster, you don't need to escape () quotes ("),
just variables won't be parsed
you use $submit in your 1st if clause, you might want to use $_POST['submit']
at last: why doing the $fxx = $r['xx'] stuff? you're only using it once,
hence just echo $r['xx'] . $r['xy'] ...
edit the opposite of == (equality) is != not !==