All pastes #593638 Raw Edit

Untitled

public text v1 · immutable
#593638 ·published 2007-06-28 13:18 UTC
rendered paste body

$search=$_POST['search'];
$search1=$_POST['search1'];

$login="data";
$password="data";
$server="localhost";
$db="data";
$table="site";

mysql_connect($server,$login,$password);
@mysql_select_db($db) or die( "Unable to select database");

$data = mysql_query("SELECT name, suite, addrange, phonerange, conname, contel, vpn, handsets, voicemail, mips, attachments FROM site WHERE $search1 LIKE '%$search%'") or die(mysql_error()); 



Error

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIKE '%Chris%'' at line 1