running into an issue with this query. db connection is fine, selects the database, but errors on query itself. commenting it out everything runs smooth.
help
$sqlquery = "INSERT INTO dogs ('Name', 'Owner', 'Age', 'Breed', 'Colour', 'Genotype', 'Sire', 'Dam', 'Hips', 'Elbows', 'Altered', 'Images', 'temperment', 'trainability', 'other') VALUES('$name', '$owner', '$dog[8]', '$dog[1]', '$dog[14]', '$genotype', '$sire', '$dam', '$dog[3]', '$elbows', '$altered', '$images', '$dog[10]','$dog[12]', '$other' ) ";
mysql_query($sqlquery) or die( "Unable to complete the query <HR>" . $sqlquery);
this is what I get returned to me
[code=html]Unable to complete the query
INSERT INTO dogs ('Name', 'Owner', 'Age', 'Breed', 'Colour', 'Genotype', 'Sire', 'Dam', 'Hips', 'Elbows', 'Altered', 'Images', 'temperment', 'trainability', 'other') VALUES('sdfg', 'owner', '4', 'Affenpinscher', 'Silver', 'genotype', 'sire', 'dam', 'Good', 'elbows', 'alt', 'images', 'Friendly','Stubborn', 'other' ) [/code]
also here's the entire php page:
<?php
$database = "changed on purpose";
$owner = "owner";
$genotype = "genotype";
$sire = "sire";
$dam = "dam";
$elbows = "elbows";
$altered = "alt";
$images = "images";
$other = "other";
$link = mysql_connect('localhost', 'changed on purpose', 'password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
@mysql_select_db($database) or die( "Unable to select database");
#$sqlquery = "INSERT INTO dogs ('Name', 'Owner', 'Age', 'Breed', 'Colour', 'Genotype', 'Sire', 'Dam', 'Hips', 'Elbows', 'Altered', 'Images', 'temperment', 'trainability', 'other') VALUES('$name', '$owner', '$dog[8]', '$dog[1]', '$dog[14]', '$genotype', '$sire', '$dam', '$dog[3]', '$elbows', '$altered', '$images', '$dog[10]','$dog[12]', '$other' ) ";
#$result = mysql_query($sqlquery, $link) or die( "Unable to complete the query <HR>" . $sqlquery);
mysql_close($link);
?>