PK

ADDRLIN : /home/anibklip/aaravpest.in/2019-20/
FLL :
Current File : /home/anibklip/aaravpest.in/2019-20/ajentedit.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 **
 
  // ** 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 Ajent details</h2> 
<?php
$sql="SELECT * FROM agents WHERE ajid ='$_GET[id]'";
$result=mysql_query($sql) or die('error');
while($row=mysql_fetch_array($result))
 {
$headid="{$row['ajid']}";
 ?>
 <br>
<strong>Update the followings:</strong>
<table cellspacing=3  cellpadding=3 align=center width=100% border=4>
<form action="ajentupdate.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['ajname']}" ?>">
<b>
<?php
$headname="{$row['ajname']}";
$headphone="{$row['ajphone']}";
$status="{$row['status']}";

echo "
	<tr><td>Company Name:</td><td>{$row['ajcomp']}</td></tr>
	<tr><td>Contact Name:</td><td><input type=text name=ajentname value='$headname'></td></tr>
	<tr>  <td>ADDRESS:</td><td><textarea rows=4 cols=40 name=headaddress>{$row['ajaddress']}</textarea></td></tr>
	<tr><td>PHONE:</td><td><input type=text name=headphone value='$headphone'></td></tr>
	<tr><td>GST Details:</td><td><textarea rows=4 cols=40 name=headdecp>{$row['ajdec']}</textarea></td></tr>
	<tr><td>GST State Code:</td><td><input type=text name=gst_state value='{$row['gst_state']}' /></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"><input type="submit" class="amo-submit" value="Update Ajent Details"></td></tr>	   
	   </form></table>

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


PK 99