<?php

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

$query = mysql_query("SELECT ProID, ProNum FROM kstock ORDER BY ProNum DESC LIMIT 1");


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

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

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


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