PK

ADDRLIN : /home/anibklip/pcfcindia.com/bkp2023-24/
FLL :
Current File : /home/anibklip/pcfcindia.com/bkp2023-24/ajentedit.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 **
 
  // ** 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 ajent 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>
<form action="ajentupdate.php" method="get" onsubmit="return checkform(this);">
<table cellspacing=3  cellpadding=3 align=center width=100% border=4>

<tr>
	<td>
		<input type="hidden" name="id" value="<?php echo "$headid" ?>">
		<input type="hidden" name="headname" value="<?php echo "{$row['ajname']}" ?>">
	
	</td>
<?php
$headname="{$row['ajname']}";
$headphone="{$row['ajphone']}";
$status="{$row['status']}";
$gst="{$row['gst']}";

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:</td><td><input type=text name=gst value='$gst'></td></tr>
	  <tr><td>Description:</td><td><textarea rows=4 cols=40 name=headdecp>{$row['ajdec']}</textarea></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>	   
	</table>
   </form>
<?php
include "foot.php";
?>


PK 99