<?php
include("../session.php");
include("../connect.php");
  
  $action=$_GET['action'];
  $data1=$_GET['text'];
 
if($action=="cName"){
	$query1=mysql_query("SELECT * from company where cName='$data1'");
	if(mysql_num_rows($query1)>0){
		
		$display=mysql_fetch_array($query1);
				$cName=$display['cName'];
				$id=$display['id'];
				$expire=$display['expireDate'];
				$email=$display['email'];
				$person=$display['cPerson'];
				$class=$display['class'];
	echo "
	<table border=1 cellpadding=3 cellspacing=1 width='80%'>
		<tr>
			<td>Company ID :</td>
			<td>$id</td>
			</tr>
		<tr>
			<td>Company Name :</td>
			<td>$cName</td>
			</tr>
		<tr>
			<td>In Charge Person :</td>
			<td>$person</td>
			</tr>
		<tr>
			<td>Update Year :</td>
			<td>
				<select name='year' value='a' onchange='vali2();'>
					<option value='a'>Select year:</option>
					<option value='1'>1</option>
					<option value='2'>2</option>
					<option value='3'>3</option>
					</select>
			</td>
			</tr>
		<tr>
			<td>Payment :</td>
			<td><input type=hidden name=paymentfield /></td>
			</tr>
		</table>
	";
	
	echo "wuwuwuwu";
	}
	
 }else{
	
	echo "
	<table border=1>
		<tr>
			<td>1</td>
			<td>2</td>
			</tr>
		<tr>
			<td>3</td>
			<td>4</td>
		</tr>
		</table>
	";
 
 
 }
 ?>
 