Reputation:
I have made most my site SE friendly, but one part of my site bugs me...
I have a HUGE form in one of the pages, and when submitting the form (action=php_page) URL is so long it covers half a word document in one line with all the passing variables...
This is very ugly...
Is there any way to make this long URL appear short?
Or some other solution you know of?
Let me know if you need more input...
Thanks
Upvotes: 2
Views: 770
Reputation: 23767
How about using POST instead of GET?
<form action="action.php" method="post">
In action.php
you would have to use $_POST
instead of $_GET
.
Remember that you should always redirect to a page that shows that the action is successful after processing a form (in this case in action.php
) using header('success.php');
. If the user were to refresh the page, the action won't happen twice (which would be unfortunate if you were to write something to a database or something similar).
Upvotes: 10
Reputation: 70540
You can use POST instead of a GET, although it wouldn't be bookmarkable, not very SEO friendy, less friendly then a long URL even. If people should be able to bookmark it/ treat it as a link, you have about 4 options:
Upvotes: 1