I have just put up a site on firebase, on it is a form where users can put in their database credentials to access it remotely. The form uses POST
to send the details to a php page, and its code looks like this:
<form name="login-form" action="login.php" method="post">
<input autocomplete="off" name="ip_address" type="text" placeholder="Enter DB IP"/>
<br/>
<input autocomplete="off" name="db" type="text" placeholder="Enter DB Name"/>
<br/>
<input autocomplete="off" name="username" type="text" placeholder="Enter Username"/>
<br/>
<input name="password" type="password" placeholder="Enter Password"/>
<br/>
<input id="login-button" type="submit" value=">"/>
</form>
Using my apache2 web server, this process works fine, and the user is redirected, however when deployed with firebase (firebase deploy --only hosting
), the process instead triggers a file download of login.php
. Why is this happening? The file structure for the public folder is exactly the same as it is for apache, as is each files content.