store sting values in single field not id below that code i tried but it stored id.and in database which type i have to use

$lid= mysql_insert_id();                   


            $cityid = trim(ucwords(strtolower(mysql_real_escape_string($_POST['city']))));
            $city = trim(ucwords(strtolower(mysql_real_escape_string($_POST['city']))));
            $num=count($_POST["place"]);

                $ids = array();
                foreach($_POST['place'] as $val)
                {
                $ids[] = (int) $val;
                }
                $ids = implode(',', $ids);
                $sql3 = mysql_query("INSERT INTO `city_place`(`state_id`,`city_id`,city,`spaid`) VALUES ('$cityid','$ids','$city',$lid)");

Perhaps try re-wording your question as it doesn't make sense, I have no idea what your asking, what problem are you trying to solve? Are you getting errors, if so what are they? Also include the code for your form which is posting to this script.

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.