I'm building a php application which uses a one-page form to select an item from the xml document, bring up some of its elements in editable fields and then save over them.

Currently I have the dropdown list which properly lists all of the restaurants in the xml file:

```
<?php
$restaurantreview = simplexml_load_file('restauraunt_reviews.xml');

$restaurant = $restaurantreview->Restaurant;

echo "<select Name='r_select' id='r_select' onchange='this.form.submit();'>"
            . "<option value='' >Select ...</option>";
for ($i = 0; $i < count($restaurant); $i++) {          
    echo "<option value='".$i."'>" . $restaurant[$i]->Name . "</option>";
}
echo "</select>";
?>

```

Once the user selects a restaurant a set of fields is supposed to come up, but when they do the fields are all empty. I'm worried that I might not be calling the value of r\_select properly.

```

<?php if (isset($_POST["r_select"])){?>
    <br>Address: <br>
    <input type = "text" name = "Street" value = <?php $restaurant[$r_select]->Address->Street?>>
    <br><br>
    <input type="submit" name="submit" value="submit">
<?php } ?>

```

Am I misunderstanding how to pass the value of the selected option from the dropdown?