0

while I was looking through some code I found one form tag which is sending the information to './' Here's what the code looks like:

<form action='./' method='post'>

I don't really know what './' is and I hope you can answer me that question.

  • 1
    your url as './' in action attribute indicates the form to post into current directory – ANR Upgraded Version May 09 '16 at 15:05
  • This question should not have been closed because the referenced "duplicate" question does not answer YOUR question, which is correctly answered in the first comment by [ANR](http://stackoverflow.com/users/3464552/anr-upgraded-version). Not only will the form post into the same directory, it will likely post to itself, so you need to have code at the top of the file that checks for post data and handles that. Basically, it's a combination form/form-processor all in one. – cssyphus May 09 '16 at 15:11
  • For a couple of examples, see http://stackoverflow.com/questions/5826784/how-do-i-make-a-php-form-that-submits-to-self and http://stackoverflow.com/questions/22209036/php-form-action-calling-itself-how-to-display-everything-in-1-page – cssyphus May 09 '16 at 15:13

1 Answers1

0

./ is the current directory. It'll send it to the default file in that directory.

TechnicalTophat
  • 1,655
  • 1
  • 15
  • 37