darksniperx Posted October 23, 2007 Share Posted October 23, 2007 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> Quote Link to comment https://forums.phpfreaks.com/topic/74493-form-submits-every-time-you-request-something-from-another-class/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.