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,968
  • 5
  • 30
  • 41
  • 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,149
  • 3
  • 21
  • 51
1

It mean to index page of the site.

Pupil
  • 23,834
  • 6
  • 44
  • 66
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,810
  • 1
  • 23
  • 43
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