Can a page contain php code?

You can’t use PHP in the WordPress back-end editor. Maybe with a plugin you can, but not out of the box.

The easiest solution for this is creating a shortcode. Then you can use something like [input type="text" name"from"] in your editor.

function input_func( $atts ) {
    extract( shortcode_atts( array(
        'type' => 'text',
        'name' => '',
    ), $atts ) );

    return '<input name="' . $name . '" id="' . $name . '" value="' . (isset($_GET['from']) && $_GET['from'] ? $_GET['from'] : '') . '" type="' . $type . '" />';
}
add_shortcode( 'input', 'input_func' );

See http://codex.wordpress.org/Shortcode_API