When running this code I get this parse error 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\phpAF.tmp on line 25
on this line of code
$Company = $row["Company"];
I have been going around and around with this and I cannot figure it out so I hoped someone could take a minute and help me.
Thanks for the help
Greg
<?php
$sql = "SELECT * FROM ggalvin1.Phonebook WHERE $textinput'LIKE' '$values'";
$connection = mysql_connect("localhost","a1234","chance") 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>";
?>