Help With Layout And Select Maintain State

I have the following html structure (very simple).




<div id="header">

	<form>

    	<input name="search" type="text" id="search" />

        <select>

          <option>Select Category</option>

          <?php foreach($category as $c): ?>

          	<option value="<?php echo $c->id; ?>"><?php echo $c->name; ?></option>

          <?php endforeach; ?>

        </select>

    </form>

</div>


<div id="main">

	<?php echo $content; ?>

</div>


<div id="footer">

	// ////////////

</div>



An image to illustrate http://postimage.org/image/s8ar5d32p/

I have two questions

1st -> no action site/index I send the content is displayed in: <? Php echo $ content;?> Then how do I get the contents of the categories for <? Php foreach ($ category the $ c):?>

2st -> How do I maintain the state of the select category when a user does a search?

Thanks!!