<?php
$login=mysql_connect('localhost', 'wauhaha_karaoke', 'cross123','wauhaha_karaoke');
	
	mysql_selectDB("wauhaha_karaoke",$login);

$query = mysql_query("SELECT SalaryID, SalaryNum FROM salarystatement ORDER BY SalaryNum DESC LIMIT 1");


$row = mysql_fetch_array($query);
$SalaryID = $row["SalaryID"];
list($one[0],$one[1]) = split('No',$SalaryID);

$index = ++$one[1];
$SalaryNum = $index;

if($index < 1000)
{
	$index = "No".$index;
}


echo "<input type='hidden' name='SalaryID' value='".$index."'><input type='hidden' name='SalaryNum' value='".$SalaryNum."'>".$index;
?>