<?php
$sometext
= mysql_real_escape_string(htmlspecialchars($_POST['sometext']));
$someothertext = mysql_real_escape_string(htmlspecialchars($_POST['someothertext']));

?>
<html>
<body>
This will go in the db<br />
sometext = <?php echo $sometext; ?><br />
someothertext = <?php echo $someothertext; ?><br />
</body>
</html>
<?php

$conn
= mysql_connect('host', 'user', 'pass') or die("could not connect to db");

mysql_select_db('db');

$query = "INSERT INTO sometable (text1,text2) VALUES('$sometext','$someothertext')";
mysql_query($query) or die("Error in query: $query.  ". mysql_error());

?>