Hello There
i got this error with my script and i dont know why???????
<html>
<head>
<title>
Welcome to the search Page
</title>
</head>
<body>
<form action="2.php" method="post">
Search:
<input type="text" name="search" >
<input type="submit" name="submit" >
</form>
</body>
</html>
<?php
//connect to database server and select a database called cars
$conn = mysql_connect("localhost", "root", "");
mysql_select_db("cars",$conn);
$query= "select * from cartable where name like '%".$search."%'";
$result=mysql_query($query);
if($result === false) {
die(mysqli_error());
}
while($record=mysqli_fetch_assoc($result)){
while(list($name,$value)=each($record)){
echo $name.$value;
}
echo "</br>";
?>
}
am using WAMP