I have made a form in a wordpress page with an action linking to a PHP-file.
The code is this:
<form name="logind" method="post" action="tjeklogin.php">
However, when I try to access the file from my website it can't find it. I'm using Filezilla as my FTP-client but I have no idea where to place the PHP-file to make it link to my form.
When I click the submit button the URL becomes: http://indreoesterbro.bysileha.com/log-ind/tjeklogin.php and I can't find the page called "log-ind" in my Filezilla.
I hope somebody can help. Don't hesitate to ask any questions.
You're using a path relative url for your action. So it's taking the current page, http://indreoesterbro.bysileha.com/log-ind/
, and appending the action to the end. You can't find the log-ind
url because it doesn't exist as a file, it's being rewritten to the index.php.
What you probably want is action="/tjeklogin.php"
. The /
before it means the link is relative to the web root, http://indreoesterbro.bysileha.com/
. So your link would then resolve as http://indreoesterbro.bysileha.com/tjeklogin.php
.