forms

How do I execute a form with PHP after jQuery submit()

This is the first time I’m submitting a form with jQuery. I know how to submit a form with PHP only (without jQuery validation before). if (isset($_POST[‘submit-form’])) { … // Do stuff here } What I need to know is, how do I call the isset($_POST[‘name’] after I submit a form with jQuery. This is what I tried, but didn’t…
Read more

AngularJS nested froms, submit button not working

I have an outer form that once submitted will, send the user to the next step. The inner form is submitting search requests for a table that is nested in the outer form. At the moment my solution is not triggering either of the two forms. <form id=”outerForm” onsubmit=”submitOuter()”> <form id=”innerForm” onsubmit=”submitInner()”> <button type=”submit” form=”innerForm”>Search</button> </form> <button type=”submit” form=”outerForm”>Next Step</button>…
Read more

JavaScript is not running on my page while I have used such validation on many pages

My JavaScript is not running on this page. While I have executed many JavaScript on many pages. please check my mistakes, what I have done. Is this a copy paste mistake or conceptual error? I have also created simple function(click()) to execute on button click but it is not running. <?php include “session.php”; ?> <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0…
Read more

How to use custom form for custom authentication backend to generate and show error messages in django?

I am using a custom backend for mobile otp verification. What I am doing is generate a six-digit otp, Verify mobile number against otp and authenticate user using otp and mobile number. My backend is as below class OtpAuthBackend(object): def authenticate(self, token=None, phone=None): try: token = OtpTokens.objects.get(otp=token, phone=phone) except: return json.dumps({‘Error’: ‘TokenDoesnotExists’}) if token.user.is_active and (datetime.datetime.now(timezone.utc)-token.created_at).seconds<300: try: profile = UserProfile.objects.get(user=token.user)…
Read more

how is PHP distorting my HTML?

I’ve been running into some problems that seem to arise from making my questionnaire a .PHP file rather than an .HTML. The reason I had to do this is because I’m using a PHP script for working with an SQL database and I had to include them into the Questionnaire, which won’t work as an HTML. In the HTML version…
Read more

Codeigniter Form result as another form input value. The second Form is not doing what it should do

I make a page where a user can search a data from a table(table Data) to then input the search result into another table(table XY). What I am trying to achieve is when the search result appear, it appears inside another form, and when the second form is submitted, the data is inserted to table XY. But so far what…
Read more

On form submit remove unused postInputs (save server processing time)

When sending forms is it good practice to remove unused (empty) post-fields from form before submit? To save server time when eg. validating post-data? Here an example with jQuery: $(function () { “use strict”; $(‘form’).submit(function (e) { var form = this; e.preventDefault(); // do pop off unused inputs $(this).find(‘input:text, textarea’).each(function () { if (!$(this).val()) { //console.info(‘… removing: ‘ + $(this).attr(‘name’));…
Read more

php – posting sent hidden value

Blog posting send to PHP <form action=”test1.php” target=”_blank” method=”post”> <input type=”hidden” name=”filename” value=”upload.rar” /><br /> <input type=”hidden” name=”filesize” value=”11MB” /><br /> <input type=”hidden” name=”id” value=”1.1.1.1″ /></p> <div align=”center”> <input type=”image” alt=”Download” height=”99″ src=”exampleweb.com/img.png” width=”184″ /> </div> </form> test1.php file <?php ????????? ?> <form action=”test2.php” target=”_blank” method=”post”> <input type=”hidden” name=”filename” value=”???????” /><br /> <input type=”hidden” name=”filesize” value=”???????” /><br /> <input type=”hidden”…
Read more

Changing password in vb.net

I have 2 forms one for login and another for changing password in vb.net and i am using access as back-end. I have made the login form using query builder.The password gets changed but when i try logging in with the new password it does not get logged in.When i close the application and open it , the new password…
Read more