0

I have a form on page www.mysite.com/myPage.php that mosttimes works but occasionally sends the form to the index page.

This is because I-m using the html 4.x style < action "">.

So what is the best generic option (not specifying the page url) to keep the form to the same page? Html would be cleaner than php, no?

The following question is 3 years old and has no accepted answer (Forms with action="")

asked Jan 8, 2014 at 11:08
5
  • 1
    Action=""?, In the action attribute of your form put ./myPage.php Commented Jan 8, 2014 at 11:14
  • blank action"" should redirect to same page Commented Jan 8, 2014 at 11:16
  • @Gamemorize A blank action="" attribute leaves it down to the browser implementation. Defining it as the current page is better (See W3 Bug Tracker) Commented Jan 8, 2014 at 11:26
  • possible duplicate of Forms with action="" Commented Jan 8, 2014 at 11:30
  • OK, I see that action "" is not the done thing anymore... I-ll accept an answer that replaces it with the latest cross/browser GENERIC mode to have action direct to same page.. Commented Jan 8, 2014 at 11:39

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.