Here is the html form with select tag with option value :
<select class="form-control" id="basic" name="location" required>
<?php
$get_location = mysqli_query($conn, "SELECT * FROM product_sub_area");
if(mysqli_num_rows($get_location) == 0 ) {
$choose = 'No City found';
} else {
$choose = 'Choose City';
}
?>
<option value=""><?php echo $choose; ?></option>
<?php
while($get_location_result = mysqli_fetch_array($get_location) ) {
$location_id = (int) $get_location_result['psub_area_id'];
$location_name = htmlspecialchars($get_location_result['psub_name']);
echo "<option value='$location_name'>$location_name</option>";
}
?>
</select>
After submit this form, page url is showing like this :
http://localhost/freelancer/sitename/location?location=California
I want the url should look like this for every same type of url request. It could be multiple query string :
I am using following .httaccess rules :
ErrorDocument 404 /not-found.php
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ $1.php [NC,L]
RewriteRule ^([^/\.]+)/([^/\.]+)$ location.php?location=$1 [NC,L]