thnx a mill guyz fo all ur support especially uttam, dash and jill finally this darrned thingg is working now
heres the code ..... the neat one this time ..... :D incase any1 mite need it ----------------- cnja_inzrt.php ----------------- <?php include"cnctdb.php"; $jb_ttl = $_POST['jb_ttl']; $loc = $_POST['loc']; $no_poz = $_POST['no_poz']; $qlf = $_POST['$rq_qlf']; //$rq_skllz = $_POST['$rq_skllz']; $mst_sklz = $_POST['mst_skllz']; $dzrd_sklz = $_POST['dzrd_skllz']; $xp_slry = $_POST['xp_slry']; $fday = $_POST['day']; $fmon = $_POST['mon']; $fyr = $_POST['yr']; $poz_typ = $_POST['poz_typ']; $k_dt = $fyr.$fmon.$fday; $cdt = date('Y-m-d'); /*********************** skllz ! ! ! ! **********************/ /****************************** goin huntin ..... ! ! ! ! ******************************/ $i=0; $j=0; $strMust = ""; $j=0; while($j<count($mst_sklz)){ if ($j == 0) $strMust = $mst_sklz[$j]; else $strMust = $strMust . ", " . $mst_sklz[$j]; print $mst_sklz[$j]; $j++; } $j=0; while($j<count($dzrd_sklz)){ if ($j == 0) $strDes = $dzrd_sklz[$j]; else $strDes = $strMust . ", " . $dzrd_sklz[$j]; print $dzrd_sklz[$j]; $j++; } $inzrt_dzrd_skllz_qry = "insert into tbl_jrd(no_poz, xpctd_slry, ttl, loc, mst_skllz, dzrd_skllz, poz_typ, klzn_dt, dt_de) values('".$no_poz."', '".$xp_slry."', '".$jb_ttl."',".$loc."', '".$strMust."', '".$strDes."', '".$poz_typ."', '".$k_dt."', '".$cdt."')"; // fld mpty ! ! ! ! if ($jb_ttl=="" || $loc=="" || $no_poz=="" || $xp_slry==""){ echo("mpty ! ! ! !".$jb_ttl."  ".$loc."  ".$no_poz."  ".$qlf."  "."  ".$xp_slry); echo("mpty field ! ! ! ! "); //header("Location: /kcntrl/rr_mpty.php?pg=cnja.php"); //exit(); } else { // all fldx flld ! ! ! ! ! /****************************** go fo da kill ! ! ! ! ******************************/ if(! mysql_query($inzrt_dzrd_skllz_qry)){ echo("$qlf_inzrt_qry didn exe ! ! ! ! :P"); } else { // mysql_query ($qlf_inzrt_qry) /*********************** qlfz ! ! ! ! **********************/ $rq_qlfz_ftch_qry = "select skll, skll_id, sq from tbl_lookup_skllz_qlf where sq='q' or sq='n'"; $rq_qlfz_ftch_qry_rzlt_hndlr = mysql_query($rq_qlfz_ftch_qry) or die("qry failed ! da tbl must xixt in da db 2 b played vid ! ! ! ! :Q "); $mx_id_inzrtd_qry = "SELECT max(pk_id) FROM tbl_jrd"; $mx_id_inzrtd_qry_rzlt_hndlr = mysql_query($mx_id_inzrtd_qry) or die(" $mx_id_inzrtd_qry qry failed ! da tbl must xixt in da db 2 b played vid ! ! ! !"); $max_id = mysql_fetch_row($mx_id_inzrtd_qry_rzlt_hndlr); $mx = $max_id[0]; $j=0; $strqlf=""; for ($count = 1; $qlfz_id = mysql_fetch_row($rq_qlfz_ftch_qry_rzlt_hndlr); ++$count) { $id = $qlfz_id[1]; $nme = $qlfz_id[0]; $qlf = $_GET[$id]; if ($qlf != "") { if ($strqlf == "") $strqlf = $qlf; else $strqlf = $strqlf . ", " . $qlf; } $j++; echo("<br>"); $qlf_inzrt_qry = "update tbl_jrd set rq_qlf='$strqlf' where pk_id=$mx"; } if(mysql_query($qlf_inzrt_qry) ){ //header("Location: /kcntrl/cjaard.php"); //exit(); echo("inzrtd ! ! ! ! "); echo("dzrd_skllz <br>".$inzrt_dzrd_skllz_qry."<br>mst_skllz"); } else { echo("cudn inzrt ! ! ! ! :S"); echo("dzrd_skllz <br>".$qlf_inzrt_qry."<br>mst_skllz"); } } // endda else mysql_query ($qlf_inzrt_qry) } // endda else all fldx flld ! ! ! ! ?> ----------------------- cnja.php ----------------------- echo(" <table width='49%' height='259' border='0' cellpadding='0' cellspacing='0'> <form action=cnja_inzrt.php method=post> <tr> <td style=\"font-family: $font\" height='259' align='center' valign='top'> <table width='100%' border='2 ' cellspacing='0' cellpadding='0'> <tr> <td style=\"font-family: $font\" height='34' colspan='3' align='center'><strong><font size='4'>JAARD</font></strong></td> </tr> <tr align='center' valign='top'> <td style=\"font-family: $font\" width='41%' height='24' valign='middle'> <div align='left'>Job Title</div></td> <td style=\"font-family: $font\" width='59%' valign='middle'> <div align='left'> <input name='jb_ttl' type='text'> </div></td> </tr> <tr> td style=\"font-family: $font\" height='21'>Position Type</td> <td style=\"font-family: $font\" height='21'>"); include"ftch_poz_typ.php"; echo(" </td> </tr> <tr> <td style=\"font-family: $font\" height='21'>Location</td> <td style=\"font-family: $font\" height='21'> <input name='loc' type='text'></td> </tr> <tr> <td style=\"font-family: $font\" height='24'>No of Positions</td> <td style=\"font-family: $font\" height='24'> <input name='no_poz' type='text'></td> </tr> <tr> <td style=\"font-family: $font\" height='22'>Required Qualifications</td> <td style=\"font-family: $font\" height='22'>"); //$rq_qlf = 'qlf_rq'; include"ftch_rq_qlf.php"; echo(" </td> </tr> <tr> <td style=\"font-family: $font\" height='24'>Expected Salary</td> <td style=\"font-family: $font\" height='24'> <input name='xp_slry' type='text'></td> </tr> <tr> <td style=\"font-family: $font\" height='21'>Must Skills</td> <td style=\"font-family: $font\" height='21'>"); $rq_skllz = 'mst_skllz[]'; include"ftch_rq_skllz.php"; echo(" </td> </tr> <tr> <td style=\"font-family: $font\" height='23'>Desired Skills</td> <td style=\"font-family: $font\" height='23'> "); $rq_skllz = 'dzrd_skllz[]'; include"ftch_rq_skllz.php"; echo(" </td> </tr> <tr> <td style=\"font-family: $font\" height='21'>Closing Date</td> <td style=\"font-family: $font\" height='21'>"); include"ftch_date.php"; echo(" </td> </tr> <tr> <td style=\"font-family: $font\" height='32' colspan='2'><input type='submit' name='Submit' style=\"font-family: $font\" value='Create New Job '></td> </tr> </table> </td> </tr> </form> </table> </div> "); ------------------------------ ftch_poz_typ.php ------------------------------ $poz_typ_ftch_qry = "select typ, poz_typ_id from tbl_lookup_poz_typ"; $poz_typ_ftch_qry_rzlt_hndlr = mysql_query($poz_typ_ftch_qry) or die("qry failed ! da tbl must xixt in da db 2 b played vid ! ! ! !"); echo("<select id=poztyp_opt name=poz_typ style=\"font-family: $font\" > <optgroup label=select position type> "); for ($count = 1; $p_t = mysql_fetch_row($poz_typ_ftch_qry_rzlt_hndlr); ++$count) { $poz_typ_id = $p_t[1]; $poz_typ = $p_t[0]; echo ("<option value=$poz_typ_id>$poz_typ "); //echo($fmly_code.$fmly_nme); } echo("</optgroup> </select>"); ---------------------------- ftch_rq_skllz.php ---------------------------- $rq_skllz_ftch_qry = "select skll, skll_id, sq from tbl_lookup_skllz_qlf where sq='s' or sq='n'"; $rq_skllz_ftch_qry_rzlt_hndlr = mysql_query($rq_skllz_ftch_qry) or die("qry failed ! da tbl must xixt in da db 2 b played vid ! ! ! !"); echo("<select id=skllz_opt name=$rq_skllz width='15' style=\"font-family: $font\" multiple> <optgroup label=select skills> "); for ($count = 1; $skllz_id = mysql_fetch_row($rq_skllz_ftch_qry_rzlt_hndlr); ++$count)//, $fmly_nme = mysql_fetch_row ($fmly_nme_ftch_qry_rzlt_hndlr) { $skll_id = $skllz_id[1]; $skll_nme = $skllz_id[0]; $sq = $skllz_id[2]; echo ("<option value=$skll_id>$skll_nme"); //echo($skll_id.$sq); } echo("</optgroup> </select> "); --------------------- ftch_rq_qlf.php --------------------- $rq_qlfz_ftch_qry = "select skll, skll_id, sq from tbl_lookup_skllz_qlf where sq='q' or sq='n'"; $rq_qlfz_ftch_qry_rzlt_hndlr = mysql_query($rq_qlfz_ftch_qry) or die("qry failed ! da tbl must xixt in da db 2 b played vid ! ! ! !"); for ($count = 1; $qlfz_id = mysql_fetch_row($rq_qlfz_ftch_qry_rzlt_hndlr); ++$count)//, $fmly_nme = mysql_fetch_row ($fmly_nme_ftch_qry_rzlt_hndlr) { $qlf_id = $qlfz_id[1]; $qlf_nme = $qlfz_id[0]; $sq = $qlfz_id[2]; echo ("<input type='checkbox' name=$qlf_id value=$qlf_id> $qlf_nme <br> "); } ------------------------------------------------------------ there u have it all dun ...... thnx a mill every1 :> gratefull toby __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php