ok so i am running into this problem that i cant seem to fix. trying to make a dynamic query. i am grabbing variables from post data and trying to put them in the query but everytime i try to run the query it doesnt work.
$id = $_POST["id"]; $imagenum = $_POST["imagenum"]; $filename //Works fine creates a random name then uploads the image with that name $query2 = "UPDATE properties SET $imagenum = '$filename' WHERE id='$id'"; $result2 = mysql_query($query2);
it seems even if i was to use '$imagenum' instead it still doesnt work.
but when i use the real field name imageone it works.
can you help me with trying to make this dynamic. trying for less code.
thanks in advance