pepega페페가P
Reactiflux3y ago
8 replies
pepega페페가

pepega1337. – 21-16 Aug 15

Hi, I have a form that calls my PHP script on the server
How can I prevent the page from re-directing to mypage.com/login.php when the submit button is pressed?
When I use e.preventdefault() it's not even called obviously, but I want to stay on the same page..

<form action="login.php" method="POST" onSubmit={(e) => handleSubmit(e)}>
Was this page helpful?