Welcome Guest, Not a member yet? Register   Sign In
Search results help
#1

[eluser]Unknown[/eluser]
I want a form that when the user submit the data, it is reflcted in the URL.

Example:

User search for "smallville" and get a page like "http://site.com/tag/smallville" (this page display search results from database about smallville)

It is possible? How to do it?
#2

[eluser]Isern Palaus[/eluser]
Hello Moti,

You can route the /tag/<word> in routes.php:

Code:
$route["tag/:any"] = "searchController/searchFunction/";

Regards,
-- Isern Palaus
#3

[eluser]Unknown[/eluser]
Thanks, I know about routing.

How to do it in a form? using redirects?
#4

[eluser]Isern Palaus[/eluser]
I haven't tested but it will work I think. Get the input variable and redirect it to /tag/<variable>.

Probably there is a better way to do it but I don' know.

Regards,
-- Isern Palaus




Theme © iAndrew 2016 - Forum software by © MyBB