Jump to content

Form Submit where value = Next &rarr


akrohn

Recommended Posts

In a form example I am learning from I came across the value of the submit button being 'Next &rarr'. Could anyone explain this to me rather than using a value that sends you to another page to process the form? In this example what I am trying to learn is form validation using a function that checks for letters and numbers only.

Link to comment
https://forums.phpfreaks.com/topic/257776-form-submit-where-value-next-rarr/
Share on other sites

Not sure if I really understand what your question is, but...

 

The value attribute of a button just controls what text is displayed in the button.  A value of 'Next →' would end up in a button with a label that looks like Next ->.

 

From the scripts point of view, the value of a button is fairly meaningless.  Usually you just check if a button was clicked by looking for it's name, eg:

if (isset($_POST['btnNext'])){

would test if the next button was pressed, assuming you have name="btnNext" in your HTML code.

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.