I am writing a script to interact with a mysql server. I am trying to have php query the database by searching for first or last names or company names. I cannot figure out why I am getting this error on this page. Any help is greatly appreciated.
Parse error: parse error, unexpected '"', expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\Documents and Settings\Greg\My Documents\PHP\Query later\php68.tmp on line 25
I believe this is line 25
$Company = $row["Company"];
Thanks
Greg
<html>
<head>
<title></title>
</head>
<body>
<?php
$sql = "SELECT * FROM ggalvin1.Phonebook WHERE $textinput'LIKE' '$values'";
$connection = mysql_connect("localhost","ggalvin1","Rowing") or die ("Couldn't Connect to the Server,");
$db = mysql_select_db("ggalvin1", $connection) or die ("Couldn't select the database,");
$sql_result = mysql_query($sql, $connection)
or die(mysql_error());
echo "<Table border=1>';
echo <tr><th>Company</th><th>First Name</th><th>Last Name</th><th>Address</th></tr>;
while ($row = mysql_fetch_array($sql_result)) {
$Company = $row["Company"];
$First_Name = $row["First Name"];
$Last_Name = $row["Last Name"];
$Address1 = $row["Address"];
echo "<tr><td>$Company</td><td>$First_Name</td><td>$Last_Name</td><td align=right>$Address1</td></tr>";
}
echo "</Table>";
?>