How to send get data with form

Hi, i want to send data with the form but the data cannot be fillen in a input field. And i dont want to use a session. I tried: <form action="index.php?dir=./location"> <input type="text" name="fileName"> </form>

12/16/2018 3:01:34 PM


7 Answers

New Answer


Sending data with forms is a server side action, your code looks ok except the fact that it does not have a post method hence the server does not know how to process it. <form action="file1.php" method="POST"> </form> Note: The method VERB must be POST, and when receiving it should be GET. I hope this helps. Regards...


I don't quite get the question. Do you mean this: <input type="hidden" name="fileName"> Input is not shown but exists.


<form action="something.php" method="GET"> <!-- a few inputs and whatever you want --> </from> i believe this would do it


you can use POST or GET create two files, htmlfile.html and phpfile.php paste these codes where u have its extension and run you will be able post data from a form htmlfile.html <form method="post" action="phpfile.php"> <input name="myname"> </form> phpfile.php <?php $name = $_POST["myname"]; echo $name; ?>


After designing a web how do you put it on the internet


Clement Benjamin you could use python to create a webserver with the http.server module and handle requests, or you could upload your files to a webhost (some free examples are 000WebHost and GithubPages (GithubPages doesn't support server-side script, but 000webhost supports php), with both of them you'll have a domain like: something.000webhostapp.com or something.github.io)