I have a large calculator built as a form. I need to create a query string from 17 of the 150 inputs on the page, for the user to share. I'm using php to fill the inputs from the URL string. When using the form method GET, it creates the url with ALL the inputs, more than the character limit, when I only need 17 inputs. What is a good way to specify inputs by name to build the query string while ignoring others. I can't edit anything but the input's names. PHP or jQuery are already used on the page but I am very amature at them. Thanks for reading, while I continue to research.
Asked
Active
Viewed 129 times
1 Answers
2
Instead of using method='GET'
on your form you can try method='POST'
. According to What is the size limit of a post request? POST requests can be quite large depending on the server configuration.
The only difference this will make to your PHP code is replacing $_GET
with $_POST
when accessing form control values.
$val = $_POST['inputnamehere'];
Heres the PHP $_Post documentation for ease.
I hope I answered your question correctly! Good luck!

Zackary Jones
- 371
- 1
- 9
-
Thank you Zackary, I just found this out as you posted. I greatly appreciate your help! https://stackoverflow.com/questions/20800345/getting-input-values-into-php-variables – Joe Barrett Jul 19 '18 at 19:15
-
No problem! glad you found what you were after! – Zackary Jones Jul 19 '18 at 19:26