title: Check if form has been submitted to itself once do one thing if back again do another?
body: <p>I have a form that submits to itself.  When I want to edit something I take the data and place it in place of empty fields.  I am trying to make a check to see if the the form has already been submitted once so that it knows that if it has come back again and put data in the blank fields on the next submit it runs an update query.</p>
  
  <p>I thought what I would do is make a variable after the query is run the first time called <code>$submitted</code> and set that to <code>true</code>  then when the form goes back to itself and see that <code>true</code> it can set another variable to <code>$submitted_twice</code> which will then let me run the edit query.</p>
  
  <p>This approach doesn't seem to be working and I can not figure out why.  Thank you for your help!</p>