title: PHP Shorthand for isset form POST value
body: <p>I am creating a form and am just looking for more efficient ways to do things.  What I have so far is:</p>
  
  <pre><code>&lt;p&gt;&lt;input type="text" name="transmission" value="" /&gt;&lt;/p&gt;
  &lt;p&gt;&lt;input type="text" name="model" value="&lt;?=$model;?&gt;" /&gt;&lt;/p&gt;
  </code></pre>
  
  <p>So some of them will have a value already set, and some will be blank.  What I want to do is see if the form has been set, and if it has then use $_POST['name'] as the value, if not then use either blank or use the previous variable I have.</p>
  
  <pre><code>&lt;p&gt;&lt;input type="text" name="name" value="&lt;?php if isset($_POST['submit'])) { echo $_POST['name']; } else { echo ""; } ?&gt;" /&gt;&lt;/p&gt;
  </code></pre>
  
  <p>But there has to be a shorter way to do that.</p>
  
  <p>IF anyone could point me in the direction I would really appreciate it.</p>
  
  <p>Thank you!</p>