can I cut this code in half?
<p>I am having a php form, and a lot of markup, so i need to repeat the same form for creating a new page entry and same for editing, so for example what am doing right now is</p>

<pre><code>if($_GET['page'] == 'hello') {
   //A whole lot of markup goes here
   &lt;form method="post"&gt;
     &lt;input type="text" name="whatever" /&gt;
     &lt;input type="submit" name="create_new" /&gt;
   &lt;/form&gt;
} elseif ($_GET['page'] == 'edit_hello') {
   //Same form markup is here, only change is the retrieved 
   //data values are echo'ed out in respective fields
   $query = mysqli_fetch_array(mysqli_query(...));
   &lt;form method="post"&gt;
     &lt;input type="text" name="whatever" value="&lt;?php echo $query['column_name']; ?&gt;" /&gt;
     &lt;input type="submit" name="create_new" /&gt;
   &lt;/form&gt;
}
</code></pre>

<p>So any idea how can I use the same code for creating new entry as well as updating the form values</p>
