Someone should please help me verify whether this code is right. I want to generate ID base on Pin from pin table under Pin column and insert into pin table in the appid column.
just try to write your query some thing like this with providing escape character ( ` ) to your field name.
mysql_query("UPDATE pin SET 'appid' ='$num' WHERE 'Pin' = '$Pin'");