PK

ADDRLIN : /home/anibklip/aaravpest.in/24-25/
FLL :
Current File : /home/anibklip/aaravpest.in/24-25/accedit.php

<?php
	include "templatic/head.php"; 
	include "templatic/header.php";
?><head>
<script language="JavaScript" type="text/javascript">
<!--
function checkform ( form )
{

  // ** START **
  if (form.headname.value == "") {
    alert( "Please enter Company Name here." );
    form.headname.focus();
    return false ;
  }
  // ** END **

  // ** START **
  if (form.headperson.value == "") {
    alert( "Please enter Address." );
    form.headperson.focus();
    return false ;
  }
  // ** END **
  
  // ** START **
  if (form.headaddress.value == "") {
    alert( "Please enter Address." );
    form.headaddress.focus();
    return false ;
  }
  // ** END **
  

  
  return true ;
}
//-->
</script>
</head>
    
<h2 id="icon_pick">Update a Client details</h2> 
<?php
$sql="SELECT * FROM parties WHERE headid ='$_GET[id]'";
$result=mysql_query($sql) or die('error');
while($row=mysql_fetch_array($result)){
	$headid="{$row['headid']}";
	?>
	<br>
	<strong>Update the followings:</strong>
	<table cellspacing=3  cellpadding=3 align=center width=100% border=4>
	<form action="accupdate.php" method="get" onsubmit="return checkform(this);">
	<input type="hidden" name="id" value="<?php echo "$headid" ?>">
	<b>
	<?php
	$headname="{$row['headname']}";
	$headphone="{$row['headphone']}";
	$headperson="{$row['headperson']}";
	$status="{$row['status']}";
	echo "
		<tr><td>Company Name:</td><td><input type=text name=headname value='{$headname}' /></td></tr>
		<tr>  <td>ADDRESS:</td><td><textarea rows=4 cols=40 name=headaddress>{$row['headaddress']}</textarea></td></tr>
		<tr><td>GST:</td><td><input type=text name=gst value='{$row['gst']}' /></td></tr>
		<tr><td>GST State Code:</td><td><input type=text name=gst_state value='{$row['gst_state']}' /></td></tr>
		<tr><td>Description:</td><td><textarea rows=4 cols=40 name=headdecp>{$row['headdecp']}</textarea></td></tr>
		<tr><td>Contact Person:</td><td><input type=text name=headperson value='$headperson'></td></tr>
		<tr><td>PHONE:</td><td><input type=text name=headphone value='$headphone'></td></tr>";
		   
	if($status=='active'){
		echo "<tr><td>status:</td><td>Active&nbsp;<input type='radio' name='status' checked='checked' value='active'>&nbsp;&nbsp;&nbsp;&nbsp;In-Active&nbsp;<input type='radio' name='status' value='inactive'></td></tr>";
	}else{
		echo "<tr><td>status:</td><td>Active&nbsp;<input type='radio' name='status'  value='active'>&nbsp;&nbsp;&nbsp;&nbsp;In-Active&nbsp;<input type='radio' name='status' checked='checked' value='inactive'></td></tr>";
	}
}
?>
<tr><td colspan=2 align=center><br><input type="submit" class="amo-submit" value="Update Client Details"></td></tr>	   
</form>
</table>

<?php
include "templatic/footer.php";
?>


PK 99