<?php 
include('config.php');

$conn->query("update setupautoid SET invtrans = invtrans + 1 WHERE id = 1");

$sql_autoid = "SELECT * FROM setupautoid";
$dcon = $conn->query($sql_autoid) or die($sql_autoid);
$rs = $dcon->fetch_array();

$autoid = $rs['invtrans'];

header('Location:new?id='.$autoid);
?>