Link to home
Start Free TrialLog in
Avatar of aprillougheed
aprillougheedFlag for United States of America

asked on

Simple page - but Syntax Error

I'm a newbie - spent about 2 hours looking for the reason I get:
 
Parse error: parse error in /home/ag/netafimusa-www/PHP/AddPet.php3 on line 34

for the page:

<html>
<head>
<title>Add Pet</title>
</head>
<body>
Catalog:<br>
<ul>

<?php
  $user="ag";
  $host="localhost";
  $password="";
  $database = "netafimusa_com";

  $connection = mysql_connect($host,$user,$password)
       or die ("couldn't connect to server");
  $db = mysql_select_db($database,$connection)
       or die ("Couldn't select database");

$label_array = array ("LiteratureDescription" => "Literature Description");

//Loop through the values
foreach ($HTTP_POST_VARS as $key => $value)

//missing curly bracket

{
$query = "INSERT INTO tblLiteratureRequested
(LiteratureDescription) VALUES ('{$label_array["LiteratureDescription"]}');

                             

$result = mysql_query($query)
     or die ("Couldn't execute query.");

echo "The following pet has been added to the Pet
       Category: "$LiteratureDescription" ;

}
//Close the loop
?>
  <!-- Close your list and html -->
</ul>
</body>
</html>
ASKER CERTIFIED SOLUTION
Avatar of axis_img
axis_img

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of aprillougheed

ASKER

I had found the error . . .  but thanks for your help.