Jump to content

date array....plz help me....


new_php85

Recommended Posts

hye everybody...

here i have problem to share with u...

can u guys help me to solve that problem...

 

i want update but field date cannot be update

why???

 

u guys got an idea???

 

here some code taht you can refer...

 

<?php
$value_K=$_POST['id_cemas'];

$inputDate1K=$_REQUEST["tmula1_K"]; 
$split1K = explode("-", $inputDate1K); 
$NewDate1K= "" . $split1K[2] . "-" .$split1K[1]. "-" .$split1K[0] ;

$i=$_REQUEST["a"];

$sqlK1=mysql_query("update t_pinjaman set tarikh_mula_potong='$NewDate1K[$i]'
		   where 	 id_t_pinjaman='$value_K[$i]'",$link);	
?>

<table width="759" border="1" align="center">
                <!--DWLayoutTable-->
                <?php
   $sql7=mysql_query("select id_pinjaman,jumlah_diluluskan,jumlah_pinjaman,tempoh_pinjaman,potongan_sebulan,
			                   date_format(tarikh_mula_potong,'%d-%m-%Y') as tarikh_mula,date_format(tarikh_kemaskini_proses,'%m') as bulan,
							   id_t_pinjaman 
							   from t_pinjaman where no_ahli='".$_REQUEST["no_ahli"]."' 
							   and date_format(tarikh_kemaskini_proses,'%Y')='".$_REQUEST["tahun"]."'
							   and date_format(tarikh_kemaskini_proses,'%m')='".$_REQUEST["bulan"]."' 
							   and status_permohonan !='0' and id_pinjaman='K'",$link);

			$bil_K=0;
		    while(list($pinjaman,$jumlah,$jum_pjm,$tempoh,$potongan,$tarikh_mula,$tarikh,$id_t_pinjam)=mysql_fetch_row($sql7))	
			{	
			    
			    if($tarikh==$_REQUEST["bulan"])
				{ 
					$P1_1pengguna=$pinjaman; 
					$P1_1tmula=$tarikh_mula;  
					$id_cemas=$id_t_pinjam;
			    }
			?> 	
<tr><th  bordercolor="#000000" class="style49"><input name="tmula1_K[]" type="text" id="tmula1_K[]" size="10"  value="<?php echo $P1_1tmula; ?>" />
<a href="javascript:NewCal('tmula1_K[]','ddmmyyyy')"><img src="images/cal.gif" alt="Pilih Tarikh" 
name="tarikh" width="19" height="16" border="0" id="tarikh" /></a> </th>

     <th bordercolor="#000000" class="style49"><input name="id_cemas[]" type="text" id="id_cemas[]"  value="<?php echo $id_cemas; ?>" size="10" />
<a href="javascript:update(<? echo $bil_K;?>)" ><img src="images/edit.gif" alt="Edit Rekod" width="18" height="16" border="0"></a></th></tr>
			<?php
			$bi_K++;
			}

              </table>

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.