how to insert values in a table with foreign key field
There is no information on the definition of your table (what foreign key?) but based on your SQL you should use a select to enter it:

insert into ques_bank 
    (q_no, uid, question) 
select null, uid, 'jdkjfsd dkskdsn skdjsd' from user_info where username ='more';


or:

insert into ques_bank 
    (uid, question) 
select uid, 'jdkjfsd dkskdsn skdjsd' from user_info where username ='more';