PK

ADDRLIN : /home/anibklip/pcfcindia.com/bkp24-25/
FLL :
Current File : /home/anibklip/pcfcindia.com/bkp24-25/accedit.php

<?php
	session_start();
	require_once 'common/common.php';
	require_once 'common/secure.php';
include("connexion.php");
include("head.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 head 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>

<form action="accupdate.php" method="get" onsubmit="return checkform(this);">
<input type="hidden" name="id" value="<?php echo "$headid" ?>">
<input type="hidden" name="headname" value="<?php echo "{$row['headname']}" ?>">
<table cellspacing=3  cellpadding=3 align=center width=100% border=4>
<b>
<?php
$headname="{$row['headname']}";
$headphone="{$row['headphone']}";
$headperson="{$row['headperson']}";
$gst="{$row['gst']}";
$status="{$row['status']}";
echo "

    <tr><td>Company Name:</td><td>$headname</td></tr>
   <tr>  <td>ADDRESS:</td><td><textarea rows=4 cols=40 name=headaddress>{$row['headaddress']}</textarea></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>
	   <tr><td>GST:</td><td><input type=text name=gst value='$gst'></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>	   
	  </table>
	   </form>

<?php
include "foot.php";
?>


PK 99