HTML Forms, ONSUBMIT, PHP Functions

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mikefromvt

    #1

    HTML Forms, ONSUBMIT, PHP Functions

    Hi.

    I have to verify and filter data received via std input through an
    HTML form that is embedded within a php scripts. I am unable to apply
    the filter to the std input data. I have been trying to push the std
    input to the filter (in the form of a function) via the ONSUBMIT
    feature of HTML forms. Should this work? Anyone know of a good,
    inexpensive php script debugger for MAC OS 10.4 Intel?

    Thanks

    Mike

  • Steve

    #2
    Re: HTML Forms, ONSUBMIT, PHP Functions


    "mikefromvt " <mike.blonder@g mail.comwrote in message
    news:1193760103 .912893.90160@d 55g2000hsg.goog legroups.com...
    Hi.
    >
    I have to verify and filter data received via std input through an
    HTML form that is embedded within a php scripts. I am unable to apply
    the filter to the std input data. I have been trying to push the std
    input to the filter (in the form of a function) via the ONSUBMIT
    feature of HTML forms. Should this work?
    nope.

    php executes on the server, not on the client. either use javascript to
    'validate' on the client-side...regardle ss, use php to validate the data
    once the form submits the data to the server.


    Comment

    • otrWalter@gmail.com

      #3
      Re: HTML Forms, ONSUBMIT, PHP Functions

      Form data validation:

      1) Client-side validation via CS Javascript
      - validate data ONSUBMIT
      - loop until you think it's right

      2) Server-sdie validation via PHP (or whatever your language is)
      - validate data via $_GET or $_POST
      - if any of it is not right, send it back to the browser
      - if it's all OK, do whatever your going to do

      I use URLParams (Firefox extension) to verify what my HTML form sends.

      Does this help?:

      Walter

      Comment

      Working...