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

$result = mysql_query("SELECT num FROM item ORDER BY num DESC LIMIT 1");


$row = mysql_fetch_array($result);
$num = $row["num"];
$one = $num;
$index = ++$one;
$num = $index;

?>