Red Bottle
Red Bottle

Reputation: 3080

How to check if details are from a specific form in php?

<form method="post"  class=" clearfix no-mar payment-form" action="checkout.php" id="checkoutRevisionProcess">
     <input type="hidden" name="joborderno" id="postsecondrevieworderno" value="%%GLOBAL_postsecondrevisionorderno%%"/>
     <div class="clearfix action-btn-submit">
          <div class="pull-right">
              <a title="Yes" class="btn btn-primary postsecondrevisionyes">PAY</a>
         </div>
     </div>
</form>

I want to write an if condition to check if this form has been called or not in php. How do I do this please help.

Upvotes: 0

Views: 47

Answers (1)

StuntHacks
StuntHacks

Reputation: 457

You can add an input with type="hidden" to each form and set it's value to the id/name you want to have for that form:

<input type="hidden" value="checkout" name="form-id" />

But be informed that you shouldn't use that for safety validations since the user would be able to just change the value using a debugger.

Upvotes: 2

Related Questions