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

$query = mysql_query("SELECT BroomID, BroomNum FROM roomtrans ORDER BY BroomNum DESC LIMIT 1");


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

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

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


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