I'm having some difficulties with the php form concept which is as follows:
There is a keyword search input form on a site which is meant to refine the appearance of the images on the site. The idea is that the keywords are passed using the get
method which constructs the url as such:
- page.php?keyword=tree
The database query is built in such a way that it can handle multiple keywords which would appear in the url as comma-separated keywords:
- page.php?keyword=tree,green,oak
How would I build a submit form which will allow users to enter a keyword which will output this page.php?keyword=tree and if he inputs another keyword in the input field it will change the link to
- page.php?keyword=tree,green
adding another keyword at its end?
My original idea was to retrieve the current url and deliver a custom one in case a variable already exists, but I'm not sure how the form itself should handle the action.
Any help will be appreciated