Click Here[1] UnderConstruction please go to upper link and click on SIGNUP TO DRIVE (Blue cruve Button) there will be a tab open type london
(Not From Drop Down) only just type london
and hit enter page will redirect to
dev.appcotech.com/pwrdup/static/become-postie-vehicle.php
page (This mean post keyword matched 100% with database) than come back to previous page and again type london
now this time from Dropdown menu
you will find London, United Kingdom
,and hit enter. They are same city but my database have only keyword london
.so page will redirect to
dev.appcotech.com/pwrdup/static/city-unavailables.php
This mean result not matched 100%
I want to match only city London, United Kingdom
to my database Keyword london
.
I only have letters london
in my database here is my code.
require_once "connection/connection.php";
if($_POST)
{
$a = $_POST['address'] ;
$sql = "SELECT * FROM tbl_city WHERE city_name LIKE '%$a%'";
$res = mysql_query($sql);
$result = mysql_fetch_array($res);
if($result >=1){
header("location:become-postie-vehicle.php");
die();
}else{
header("location:city-unavailables.php");
die();
}
where $a = $_POST['address'] ;
is input field name (Where it is use for search) so please let me know how can I match the city from my database?my database is given below
CREATE TABLE IF NOT EXISTS `tbl_city` (
`id` int(100) NOT NULL,
`city_name` varchar(100) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
INSERT INTO `tbl_city` (`id`, `city_name`) VALUES
(1, 'london');
Now please help me to find out solution. Remember i have used REGEXP
MATCH() ... AGAINST
in $sql
already.it is most challenging ever.
Anyone have Solution???