Here is the form:
<form action='<?php echo $_SERVER['PHP_SELF'];?>'>
<p><label>Movie Title:</label><input type='text' name='search'></p>
<p><input id="submit" type='submit' value='Submit'></p>
</form>
When the form is submitted, currently the URL returns like so:
localhost/movie/index.php?search=ted
I would like for the URL to return like so:
localhost/movie/search/ted
EDIT:
I now have the following code in my .htaccess:
RewriteCond %{QUERY_STRING} ^search=(.*)$ [NC]
RewriteRule ^$ /search/%1 [NC,R,L]
RewriteRule ^search/(.+)$ index.php?search=$1 [NC,L]
This works when you type in the URL /movie/search/ted
but when you submit the form it still comes out as /movie/index.php?search=ted