Hi

I am having a problem with the following line:

$query =  mysqli_query($link, "UPDATE `getgigs` SET `venue` = '$venue', `town` = '$town', `phone` = '$tel', `website` = '$web', `email` = '$email', `address` = '$add' WHERE `rock` = '$url'") or die("Error: ". mysqli_error($link). " with query ". $query);

It is telling me I have a syntax error here, but I cannot work out what it is.

Thanks for any help

It can fail if one of the values contains a single quote. Post the full query and the error.

Yes @pritaeas is right. It may be failing because one of the value contains a single quote or special character.

Did you use mysqli_real_escape_string on the values you are passing to the query before paasing it to the query?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.