2

action of a form normally refers to the script which runs after submittting. I saw a code with form action="/" and I am unable to find to where it goes. Someone please explain me.

Madusanka
  • 2,830
  • 5
  • 27
  • 40
  • It sends the form data to the index page or the home page of that site where the form is. Here, [Try it yourself](http://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_input_type) – Anjan Baradwaj Sep 26 '13 at 08:02

4 Answers4

6

It goes to the index of the base dir.

Joran Den Houting
  • 3,141
  • 3
  • 20
  • 51
1

It mean to index page of the site.

Pupil
  • 23,528
  • 5
  • 42
  • 64
1

It sends the form to the index page of the site. (normally index.php, but often index.html, or main.html)

Zack Newsham
  • 2,498
  • 21
  • 39
0

See it as an directory. The / just means that your application will search in the very first directory for an index.php file.

MichaelP
  • 181
  • 5
  • 22