0

I am at my wits end ! Dont know what's wrong with the following code. It is always saying "Parse error: syntax error, unexpected $end in C:\Program Files\EasyPHP-5.3.6.0\www\addallbuy.php on line 51"

<?Php

mysql_connect("localhost","root");
mysql_select_db("landshop_clientdata");

$Date = Date("Y-m-d");
$Agt="Landshoppe";
$user="anitg";
$Title="Mr.";
$first="Anit";
$last="Gopinath";
$Age="40";
$prop="Wanted 1 BHK/2BHK and other properties";
$phone="9833157945";
$email="anit@landshoppe.com";
$Trans="Any";
$Propt="Any";
$Area="0";
$Units="Any";
$Price="0";
$Add="Please register and add property";


$query = 'SELECT city FROM cities';

$result =mysql_query($query);

while ($info = mysql_fetch_array($result))


	{

	{echo $info['city'];echo"<br>";}

	$Loca=$city;


	$sql="INSERT INTO clientdata (Date,Agent_Ind,username,Title,Firstname,Lastname,Age,phone,Email,propheading,Transaction, PropertyType,Area, Units,Price, Location, AdditionalData)
	VALUES($Date,$Agt,$user,$Title,$first,$last,$Age,$phone,$email,$prop,$Trans,$Propt,$Area,$Units,$Price,$Loca,$Add)”;

	$result2=mysql_query($sql);

	if ($result)

	{echo 'Updated';}


}

?>
2
Contributors
1
Reply
3
Views
6 Years
Discussion Span
Last Post by Insensus
0

The closing double-quote for your MySQL query on line 39 is actually the wrong character.
It should be a " and you have a , so the string is never closed and eats the rest of your code.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.