$result = mysql_query("SELECT cusid FROM customer ORDER BY cusid DESC LIMIT 1");
$row = mysql_fetch_assoc($result);
echo "The last id = " . $row['cusid'];
"ORDER BY cusid DESC" sorts by cusid in reverse.
"LIMIT 1" chooses only 1 row from the possible result set.
Together they give you the last row in the table when the table is sorted by cusid.
mysql_fetch_assoc() is used since mysql_query() returns a resource.