Dear All,
what I'm trying to do is create a button that "reads" the maximum id stored in a table, add 1 and then fill the id field on my add page (the button placed on the same page e41_new_add.php).
The code I use in the button properties is:
(Server)
global $conn;
$str = "select max(id) as max_id from documents";
$rs = db_query($str,$conn);
$data = db_fetch_array($rs);
$next = $data["max_ID"]+1;
(Client after)
document.forms.editform1.value_id_1.value = $next;
every time i press the button the browser just freezes. Any ideas?
Regards
Giorgio