Dear Friend Thanks for ur excellent reply. Here is my table structure...which will be more easier for me to use. [code] CREATE TABLE `_student_info` ( `st_sl` bigint(20) NOT NULL auto_increment, `st_id` varchar(25) NOT NULL default '', `st_name` varchar(50) NOT NULL default '', `st_sem` char(3) NOT NULL default '', PRIMARY KEY (`st_sl`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1; CREATE TABLE `_student_reg_info` ( `st_id` varchar(25) NOT NULL default '', `st_coursecode` varchar(10) NOT NULL default '', `st_coursecredit` varchar(10) NOT NULL default '', `st_coursesection` char(2) NOT NULL default '', `st_date` varchar(20) NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1; [/code] [code] for($i=0;$i<count($_POST['cc']);$i++) { $cr="cr".$i; $sec="se".$i; $dt="dt".$i; $str=explode("#",$_POST['cc'][$i]); $cc=$str[1]; if(($cc<>"")&& ($_POST[$dt]<>"")) { $sql="insert into _student_reg_info(st_id,st_coursecode,st_coursecredit,st_coursesection,st_date) values('$dpt$id','{$cc}','{$_POST[$cr]}','{$_POST[$sec]}','{$_POST[$dt]}')"; //echo $sql."ada"; $rs=mysql_query($sql); if($rs) { echo "Successfully added course code {$cc} for Student id= '$dpt$id'<br>"; } else { echo "Failed"; } } } $datetime=date("y-m-d h:i:s"); if($rs){ $sql1="insert into _student_info(st_id,st_name,st_sem,datetime) values ('$dpt$id', '$name', '$sem', '$datetime')"; //echo $sql."ada"; mysql_query($sql1); } [/code] Feiends If I use the above code and table structure then how will I give the limitation to input that I described my first request. Thanking You