<?php
include("connect.php");

$query = "SELECT ProID, ProNum FROM stock ORDER BY ProNum DESC LIMIT 1";
$result = $db->query($query);

$row = $result->fetch_array();
$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;
?>