Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

forms html action

Tags:

html

When I have a form like this:

<form method="post" action=".">

What does the "." in action stand for?

like image 953
MacPython Avatar asked Oct 15 '25 17:10

MacPython


1 Answers

The action attributes tell the form where to post the form data to.

. Stands for current directory, so I would say this posts to the default document in the current directory.

There are several notations for relative paths:

  • .. stands for parent directory
  • . stands for current directory
  • / stands for root directory if the URI starts with it
  • / stands for child directory if the URI does not start with it
like image 160
Oded Avatar answered Oct 18 '25 06:10

Oded