You had too many {} and you dont need a ; at the end of the file...here is the proper code 🙂
<form action="namevars.php" method="POST">
Name: <input type="text" name="username"><br>
Email: <input type="text" name="email"><br>
<input type="hidden" name="form" value="submitted">
<input type="submit" name="submit" value="Submit me!">
</form>
<br><br>
<?php
if($form == "submitted") { ?> Check these values: <br>
<?php print $username; ?> <br>
<?php print $email; ?>
<br><br>
<form action="submit.php" method="POST">
<input type="hidden" name="s_username" value="<?php print $username; ?>">
<input type="hidden" name="s_email" value="<?php print $email; ?>">
<input type="submit" name="submit" value="Enter into database"> <?php
}?>