0
I’d like to make that link:
meusite.com/?searchInput=Eu+fui+viajar&categorySearch=Filme&submitSearch.x=19&submitSearch.y=17
in
meusite.com/category=Filme&search=Eu+fui+viajar
.htacess:
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ index.php?url=$1
php_value post_max_size 2000M
php_value upload_max_filesize 2500M
php_value max_execution_time 6000000
php_value max_input_time 6000000
php_value memory_limit 2500M
I don’t know much about Friendly Urls, so I have no idea how to do it, I took a look on the internet, but I didn’t find anything like what I want.
Form:
<form method="GET" class="floatLeft formSearch">
<div class="formSearchDiv">
<input type="search" name="searchInput" class="searchInput floatLeft">
<select name="categorySearch" maxlength="255" class="categorySearch floatLeft">
<option value="Todos" selected="selected">Todos</option>
<option value="Serie">Serie</option>
<option value="Filme">Filme</option>
<option value="Anime">Anime</option>
<option value="Filme Adulto">Filme Adulto</option>
<option value="Desenho">Desenho</option>
<option value="Software">Software</option>
<option value="Jogos">Jogos</option>
</select>
<input type="image" name="submitSearch" src="<?=DIR_IMAGES ?>lupa.png" class="submitSearch floatLeft">
</div>
</form>
Get:
if(isset($_GET['searchInput']))
{
$pesquisa = $_GET['searchInput'];
$categorySearch = $_GET['categorySearch'];
//aqui chamo o metodo SQL para separar pela pesquisa e categoria
}
Lucas, good morning. <br> Please show the rest of the form code.
– Marcos Júnior
Lucas, good morning. Please show the rest of the form code.
– Thiago Santos
@Thiagosantos I already asked the question
– Lucas Caresia
Wouldn’t a url with vertical bars be better? Type meusite.com/Category/filme/search/eu-fui-viajar
– Max Rogério
@Maxrogério But how to do it automatically ??
– Lucas Caresia
@Lucascarezia The model MVC fits right with your project.
– M8n
@Lucascarezia So you use a mvc framework in php I know Cakephp, Zend and Laravel
– M8n