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

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

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

$autoid = $rs['po'];

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