I have a query that inserts using a select:
INSERT INTO courses (name, location, gid) SELECT name, location, gid FROM courses
Yes, it is. You can write :
INSERT INTO courses (name, location, gid) SELECT name, location, 'whatever you want' FROM courses WHERE cid = $ci
or you can get values from another join of the select ...