Jump to content

[PHP] How to POST data without click Submit


Recommended Posts

Hello guys!!!

Please I need to know how could I post some data using a form (<form method='post' action='somefile.php'>) but without need to click the submit button (<input type='submit' value='Submit'>).

Bye

Link to comment
Share on other sites


well you'll need to give us an example here...

do you want the page to automatically go to somefile.php when you do something? if so then what is that action that you are doing?

Link to comment
Share on other sites

ah I was planning on making such as login system, that the first page would post the data (login, pass, etc.) to a second page that will validade the info and then post the data (if correct) to a third file that will do something more.

But it's ok, I already got the answer. The keyword is: Javascript.

If you want, I can post my code here later.

Bye!

Link to comment
Share on other sites

what did you use javascript for exactly? are you just pulling the usernames/pass from a DB? all you would need to do is check the posted info with the DB info.

from there what i did was an if statement for my home page once logged in. if the username+pass were correct, then show the homepage, else display that the login info is incorrect and have a link back to the login page.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...