PK

ADDRLIN : /home/anibklip/aaravpest.in/gujarat25/
FLL :
Current File : /home/anibklip/aaravpest.in/gujarat25/clntadded.php

<?php
include "templatic/head.php"; 
include "templatic/header.php";
?>
<h2 id="icon_pick">Client Added</h2>
<?php
$headname=trim(strtoupper($_GET['headname']));

$sql="SELECT * FROM parties WHERE headname='$headname' ";
$result=mysql_query($sql) or die('error');
if(mysql_num_rows($result)){
	?>
	<tr>
		<td colspan='8' align=center>
			<center><br><br><img src="img/warning.png"><br><br>
			Client <b>[ <?php echo $headname?> ]</b> Already Added<br><br>
			<a href=addaclnt.php>Click here</a> to Add Another Client.<br><br>
		</td>
	</tr>
	<?php
}else{
	$dat=date("d-m-Y");
	$sql="INSERT INTO parties(headname, headaddress, headdecp, headphone, headperson, headdate, status, gst, gst_state) 
	VALUES('$_GET[headname]', '$_GET[headaddress]', '$_GET[headdecp]', '$_GET[headphone]', '$_GET[headperson]', '$dat', 'active', '$_GET[gst]', '$_GET[gst_state]')";
	//echo $sql;
	$result=mysql_query($sql) or die('error'.mysql_error());
	echo "<center><br><br><img src=./img/success.png alt=Sucess><br><br>Client <b>$headname</b> Added Sucessfully, <a href=addaclnt.php>Click here</a> to Add Another Client.
	<br><br>
	<a href=addaclnt.php>Click here to be back at Clients Management</a><br></center>
	";
}
?>
<br><br><br>
<?php
include "templatic/footer.php";
?>


PK 99