It's because you're using double quotes around something with double quotes IN it. You either escape them or use single quotest around it.
echo '<input type="button" onClick="javascript:history.back(1);" value="Back">';
Single quotes don't expand variable inside them, but you really need to do some tutorials as this is day #1 stuff, and while we like to help people around here, nobody likes to babysit.