Jump to content

form submits every time you request something from another class???


darksniperx

Recommended Posts

I have html form

from time to time I access methods from class forms since it contains all of the function are needed to work with forms.

in the form it self I request 2 different functions from class form, the thing is when I press submit button, the form submits it self the ammount of times as the function that request data from forms.php class.

 

html doc
$forms-> new form;
<form method="post" action="" onsubmit="validator()">
A<input type='text' value="<?php $form->getA(); ?>"/>
B<input type='text' value="<?php $form->getB(); ?>"/>
<input name='formEntry_submit' type='submit' value='Submit' /> |
</form>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.