i have 2 tables: “fga” and “directory” with a common field of “name”
i have a search form that is always showing error: “Couldn’t execute query”
[code=html]<form name=”form” action=”billing.php” method=”get”>
<input type=”text” name=”q” />
<input type=”submit” name=”Submit” value=”Search” />
</form>
[code=php]<?php
include(“config.php”);
$connection=mysql_connect($hostname,$user,$pass)or die (“Failed to connect.”);
mysql_select_db($dbname,$connection) or die (“Cannot connect to DB”);
$var = @$_GET[‘q’];
$q=$_REQUEST[‘q’];
$result = mysql_query(“SELECT * FROM fga JOIN directory ON fga.name=directory.name WHERE name LIKE “%$q%””) or die(“Couldn’t execute query”);?>