I'm going crazy trying to find my error, an unexpected " on line 19. Any help would be greatly appreciated. Here is my code:

1 <?php
2 // Change Family in Membership Directory and Display
3
4 // connect to database
5 include("coninfo.php");
6 mysql_connect(localhost,$username,$password);
7 @mysql_select_db($database) or die("Unable to select database");
8
9 $id=$POST['id'];
10 $family_name=$
POST['family_name'];
11 $address1=$POST['address1'];
12 $address2=$
POST['address2'];
13 $city=$POST['city'];
14 $state=$
POST['state'];
15 $zip=$POST['state'];
16 $ann_date=$
POST['ann_date'];
17 $note=$_POST['note'];
18
19 $data="UPDATEfamilySETdate_modified='now()', family_name='$family_name',address1='$address1',address2='$address2', city='$city', state='$state', '$zip', ann_date='$ann_date', note='$note'WHEREfamily.id='$id'";

20
$query=mysqli_query($data)ordie("Couldn'texecutequery.".mysqli_error());
21**
22 ?>

THANKS!!!

    I have corrected the problem stated above by eliminating the spaces before and after the = sign changing line 19 to:

    19 $data="UPDATEfamilySET*date_modified='now()',

    Now, I have this message:

    Parse error: syntax error, unexpected T_STRING in... line 20

    I've tried escaping the quotes with \'s with no change. Any help would be greatly appreciated. Thanks.

      Write a Reply...