# \[PHP, MySQL, FLASH\] - Search Error

**URL:** https://forum.kirupa.com/t/php-mysql-flash-search-error/191449
**Category:** programming
**Created:** [June 20, 2006, 4:58pm UTC](https://forum.kirupa.com/t/php-mysql-flash-search-error/191449 "2006-06-20T16:58:32Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Flash\_Man1](https://avatars.discourse-cdn.com/v4/letter/f/8797f3/32.png) [@Flash\_Man1](https://forum.kirupa.com/u/Flash_Man1)
#### Post date: [June 20, 2006, 4:58pm UTC](https://forum.kirupa.com/t/php-mysql-flash-search-error/191449/1 "2006-06-20T16:58:32Z")

</div>

Hey all,

i’m trying to have a small search thing on a site where you can search a database.

code is:

\<?  
$name=$\_GET[‘name’];  
$company=$\_GET[‘company’];  
$address=$\_GET[‘address’];  
$phone=$\_GET[‘phone’];  
$email=$\_GET[‘email’];  
$web=$\_GET[‘web’];

```
mysql_pconnect("host","random","random") or die ("didn't connect to mysql");
mysql_select_db("database") or die ("no database");

```

**$query = “SELECT \* FROM table\_name WHERE (Name, Company, Address, Phone, Email, Web) = (’$name’, ‘$company’, ‘$address’, ‘$phone’, ‘$email’, ‘$web’)”;  
$result = mysql\_query( $query ) or die (“didn’t query”);**

$num = mysql\_num\_rows( $result );  
//echo ($num);  
if ($num == 1){  
while ($line=mysql\_fetch\_array($result)) {  
$profile = “name\_show=” . $line[‘Name’];  
$profile = “company\_show=” . $line[‘Company’];  
$profile = “address\_show=” . $line[‘Address’];  
$profile = “phone\_show=” . $line[‘Phone’];  
$profile = “email\_show=” . $line[‘Email’];  
$profile = “web\_show=” . $line[‘Web’];

```
}
print $profile;

```

} else {  
print “error=Sorry, but I can’t show results”;  
}  
?\>

the problem lies in there (“didn’t query”) is the error i get, im not too advanced in mysql but any help on this problem and improvements would be awesome.

Thanks in advanced ppl’s!

:toad::toad:
