Just have 1 set of <?php's
PHP Code:
<?php
all your code in here
?>
Try this:
PHP Code:
$query = "INSERT INTO menu (menu_name, position, visible) VALUES (
'{$menu_name}', '{$position}', '{$visible}')";
You need to keep the same formatting around the variables
'var1','var2','var3'
or
var1,var2,var3
(with or without quotes)