$gid=$_GET["gid"];
<?php
$objConnect = mysql_connect("localhost","root","Wk262839") or die("Error Connect to Database");
$objDB = mysql_select_db("g61");
//$strSQL = "UPDATE activity SET gg='".$school_name."' where ac_id=$ac_id";
//$strSQL = "UPDATE activity SET '".$gid."'='".$school_name."' where ac_id=$ac_id";
$strSQL = "UPDATE activity SET '.$gid.'='".$school_name."' where ac_id=$ac_id";
$objQuery = mysql_query($strSQL);