Thanks Radices, I'll check Formidable Pro Forms, but I would like to build my own stuff if possible.
Thanks hearvox, answering your question: the echo I use after executing the query and before closing the big (6 lines) php block shows the desired data, however the echo inside the form block doesn't. Maybe the value of $result is lost when the php block is closed? Here is the entire code I wrote in the WP post (page):
<?php
global $wpdb;
$id = 2;
$result = $wpdb->get_results( "SELECT * FROM 4ps_people WHERE id=" . $id);
echo $result[0]->name;
?>
<form>
Name: <input type="text" value="<?php echo $result[0]->name; ?>"/> </br>
</form>