title: How to build a php if-statement based on the status of a form (submited/unsubmited)?
body: <p>Right now, when I submit a form, I get this in my URL:</p>
  
  <blockquote>
    <p><a href="http://www.taiwantalk.org/users/admin/edit/?updated=true" rel="nofollow">http://www.taiwantalk.org/users/admin/edit/?updated=true</a></p>
  </blockquote>
  
  <p>It's a form to updates an user's profile (I'm using Wordpress
  but I guess that <code>?updated=true</code> is a php thing).</p>
  
  <p>I want to build a if-statement with that information:</p>
  
  <pre><code>if ( form=updated] ) {
  //do this
  }
  </code></pre>
  
  <p>How to build an if-statement based on the submitted or updated status of the form?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>The source code of the form (just in case):</p>
  
  <pre><code>&lt;form id="bbp-your-profile" action="&lt;?php bbp_user_profile_edit_url( bbp_get_displayed_user_id() ); ?&gt;" method="post"&gt;
  
      &lt;h2 class="entry-title"&gt;&lt;?php _e( 'Name', 'bbpress' ) ?&gt;&lt;/h2&gt;
  
      &lt;?php do_action( 'bbp_user_edit_before' ); ?&gt;
  
      &lt;fieldset class="bbp-form"&gt;
          &lt;legend&gt;&lt;?php _e( 'Name', 'bbpress' ) ?&gt;&lt;/legend&gt;
  
          &lt;?php do_action( 'bbp_user_edit_before_name' ); ?&gt;
  
          &lt;div&gt;
              &lt;label for="first_name"&gt;&lt;?php _e( 'First Name', 'bbpress' ) ?&gt;&lt;/label&gt;
              &lt;input type="text" name="first_name" id="first_name" value="&lt;?php echo esc_attr( bbp_get_displayed_user_field( 'first_name' ) ); ?&gt;" class="regular-text" /&gt;
          &lt;/div&gt;
  
          &lt;div&gt;
              &lt;label for="last_name"&gt;&lt;?php _e( 'Last Name', 'bbpress' ) ?&gt;&lt;/label&gt;
              &lt;input type="text" name="last_name" id="last_name" value="&lt;?php echo esc_attr( bbp_get_displayed_user_field( 'last_name' ) ); ?&gt;" class="regular-text" /&gt;
          &lt;/div&gt;
  
          &lt;div&gt;
              &lt;label for="nickname"&gt;&lt;?php _e( 'Nickname', 'bbpress' ); ?&gt;&lt;/label&gt;
              &lt;input type="text" name="nickname" id="nickname" value="&lt;?php echo esc_attr( bbp_get_displayed_user_field( 'nickname' ) ); ?&gt;" class="regular-text" /&gt;
          &lt;/div&gt;
  
          &lt;div&gt;
              &lt;label for="display_name"&gt;&lt;?php _e( 'Display name publicly as', 'bbpress' ) ?&gt;&lt;/label&gt;
  
              &lt;?php bbp_edit_user_display_name(); ?&gt;
  
          &lt;/div&gt;
  
          &lt;?php do_action( 'bbp_user_edit_after_name' ); ?&gt;
  
      &lt;/fieldset&gt;
  
      &lt;h2 class="entry-title"&gt;&lt;?php _e( 'Contact Info', 'bbpress' ) ?&gt;&lt;/h2&gt;
  
      &lt;fieldset class="bbp-form"&gt;
          &lt;legend&gt;&lt;?php _e( 'Contact Info', 'bbpress' ) ?&gt;&lt;/legend&gt;
  
          &lt;?php do_action( 'bbp_user_edit_before_contact' ); ?&gt;
  
          &lt;div&gt;
              &lt;label for="url"&gt;&lt;?php _e( 'Website', 'bbpress' ) ?&gt;&lt;/label&gt;
              &lt;input type="text" name="url" id="url" value="&lt;?php echo esc_attr( bbp_get_displayed_user_field( 'user_url' ) ); ?&gt;" class="regular-text code" /&gt;
          &lt;/div&gt;
  
          &lt;?php foreach ( bbp_edit_user_contact_methods() as $name =&gt; $desc ) : ?&gt;
  
              &lt;div&gt;
                  &lt;label for="&lt;?php echo $name; ?&gt;"&gt;&lt;?php echo apply_filters( 'user_'.$name.'_label', $desc ); ?&gt;&lt;/label&gt;
                  &lt;input type="text" name="&lt;?php echo $name; ?&gt;" id="&lt;?php echo $name; ?&gt;" value="&lt;?php echo esc_attr( bbp_get_displayed_user_field( 'name' ) ); ?&gt;" class="regular-text" /&gt;
              &lt;/div&gt;
  
          &lt;?php endforeach; ?&gt;
  
          &lt;?php do_action( 'bbp_user_edit_after_contact' ); ?&gt;
  
      &lt;/fieldset&gt;
  
      &lt;h2 class="entry-title"&gt;&lt;?php bbp_is_user_home() ? _e( 'About Yourself', 'bbpress' ) : _e( 'About the user', 'bbpress' ); ?&gt;&lt;/h2&gt;
  
      &lt;fieldset class="bbp-form"&gt;
          &lt;legend&gt;&lt;?php bbp_is_user_home() ? _e( 'About Yourself', 'bbpress' ) : _e( 'About the user', 'bbpress' ); ?&gt;&lt;/legend&gt;
  
          &lt;?php do_action( 'bbp_user_edit_before_about' ); ?&gt;
  
          &lt;div&gt;
              &lt;label for="description"&gt;&lt;?php _e( 'Biographical Info', 'bbpress' ); ?&gt;&lt;/label&gt;
              &lt;textarea name="description" id="description" rows="5" cols="30"&gt;&lt;?php echo esc_attr( bbp_get_displayed_user_field( 'description' ) ); ?&gt;&lt;/textarea&gt;
              &lt;span class="description"&gt;&lt;?php _e( 'Share a little biographical information to fill out your profile. This may be shown publicly.', 'bbpress' ); ?&gt;&lt;/span&gt;
          &lt;/div&gt;
  
          &lt;?php do_action( 'bbp_user_edit_after_about' ); ?&gt;
  
      &lt;/fieldset&gt;
  
      &lt;h2 class="entry-title"&gt;&lt;?php _e( 'Account' ) ?&gt;&lt;/h2&gt;
  
      &lt;fieldset class="bbp-form"&gt;
          &lt;legend&gt;&lt;?php _e( 'Account' ) ?&gt;&lt;/legend&gt;
  
          &lt;?php do_action( 'bbp_user_edit_before_account' ); ?&gt;
  
          &lt;div&gt;
              &lt;label for="user_login"&gt;&lt;?php _e( 'Username', 'bbpress' ); ?&gt;&lt;/label&gt;
              &lt;input type="text" name="user_login" id="user_login" value="&lt;?php echo esc_attr( bbp_get_displayed_user_field( 'user_login' ) ); ?&gt;" disabled="disabled" class="regular-text" /&gt;
              &lt;span class="description"&gt;&lt;?php _e( 'Usernames cannot be changed.', 'bbpress' ); ?&gt;&lt;/span&gt;
          &lt;/div&gt;
  
          &lt;div&gt;
              &lt;label for="email"&gt;&lt;?php _e( 'Email', 'bbpress' ); ?&gt;&lt;/label&gt;
  
              &lt;input type="text" name="email" id="email" value="&lt;?php echo esc_attr( bbp_get_displayed_user_field( 'user_email' ) ); ?&gt;" class="regular-text" /&gt;
  
              &lt;?php
  
              // Handle address change requests
              $new_email = get_option( bbp_get_displayed_user_id() . '_new_email' );
              if ( $new_email &amp;&amp; $new_email != bbp_get_displayed_user_field( 'user_email' ) ) : ?&gt;
  
                  &lt;span class="updated inline"&gt;
  
                      &lt;?php printf( __( 'There is a pending email address change to &lt;code&gt;%1$s&lt;/code&gt;. &lt;a href="%2$s"&gt;Cancel&lt;/a&gt;', 'bbpress' ), $new_email['newemail'], esc_url( self_admin_url( 'user.php?dismiss=' . bbp_get_current_user_id()  . '_new_email' ) ) ); ?&gt;
  
                  &lt;/span&gt;
  
              &lt;?php endif; ?&gt;
  
          &lt;/div&gt;
  
          &lt;div id="password"&gt;
              &lt;label for="pass1"&gt;&lt;?php _e( 'New Password', 'bbpress' ); ?&gt;&lt;/label&gt;
              &lt;fieldset class="bbp-form"&gt;
                  &lt;input type="password" name="pass1" id="pass1" size="16" value="" autocomplete="off" /&gt;
                  &lt;span class="description"&gt;&lt;?php _e( 'If you would like to change the password type a new one. Otherwise leave this blank.', 'bbpress' ); ?&gt;&lt;/span&gt;
  
                  &lt;input type="password" name="pass2" id="pass2" size="16" value="" autocomplete="off" /&gt;
                  &lt;span class="description"&gt;&lt;?php _e( 'Type your new password again.', 'bbpress' ); ?&gt;&lt;/span&gt;&lt;br /&gt;
  
                  &lt;div id="pass-strength-result"&gt;&lt;/div&gt;
                  &lt;span class="description indicator-hint"&gt;&lt;?php _e( 'Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! " ? $ % ^ &amp;amp; ).', 'bbpress' ); ?&gt;&lt;/span&gt;
              &lt;/fieldset&gt;
          &lt;/div&gt;
  
          &lt;?php if ( !bbp_is_user_home() ) : ?&gt;
  
              &lt;div&gt;
                  &lt;label for="role"&gt;&lt;?php _e( 'Role:', 'bbpress' ) ?&gt;&lt;/label&gt;
  
                  &lt;?php bbp_edit_user_role(); ?&gt;
  
              &lt;/div&gt;
  
          &lt;?php endif; ?&gt;
  
          &lt;?php if ( is_multisite() &amp;&amp; is_super_admin() &amp;&amp; current_user_can( 'manage_network_options' ) ) : ?&gt;
  
              &lt;div&gt;
                  &lt;label for="role"&gt;&lt;?php _e( 'Super Admin', 'bbpress' ); ?&gt;&lt;/label&gt;
                  &lt;label&gt;
                      &lt;input type="checkbox" id="super_admin" name="super_admin"&lt;?php checked( is_super_admin( bbp_get_displayed_user_id() ) ); ?&gt; /&gt;
                      &lt;?php _e( 'Grant this user super admin privileges for the Network.', 'bbpress' ); ?&gt;
                  &lt;/label&gt;
              &lt;/div&gt;
  
          &lt;?php endif; ?&gt;
  
          &lt;?php do_action( 'bbp_user_edit_after_account' ); ?&gt;
  
      &lt;/fieldset&gt;
  
      &lt;?php do_action( 'bbp_user_edit_after' ); ?&gt;
  
      &lt;fieldset class="submit"&gt;
          &lt;legend&gt;&lt;?php _e( 'Save Changes', 'bbpress' ); ?&gt;&lt;/legend&gt;
          &lt;div&gt;
  
              &lt;?php bbp_edit_user_form_fields(); ?&gt;
  
              &lt;button type="submit" id="bbp_user_edit_submit" name="bbp_user_edit_submit"&gt;&lt;?php bbp_is_user_home() ? _e( 'Update Profile', 'bbpress' ) : _e( 'Update User', 'bbpress' ); ?&gt;&lt;/button&gt;
          &lt;/div&gt;
      &lt;/fieldset&gt;
  
  &lt;/form&gt;
  </code></pre>