+ 8
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>
6 odpowiedzi
+ 3
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;
?>
+ 3
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...
+ 1
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)
0
<form action="something.php" method="GET">
<!-- a few inputs and whatever you want -->
</from>
i believe this would do it
0
After designing a web how do you put it on the internet
0
Thanks