thomas
|
| Posted: 10/02/2002, 11:32 PM |
|
Hi,
i have a formular that should automatic insert a record into a mysql-database if it is opened.
i wrote into the open event of the the formular the following code:
$db->query("INSERT INTO kontakte VALUES ('','','','','','','','','','','','','','','','')");
$last = mysql_insert_id();
How is it possible to give the ID of the last insert record ($last), to the running record formular, so that the button update is shown ?
many thanx for help !!!
thomas
|
|
|
 |
thomas
|
| Posted: 10/03/2002, 1:33 AM |
|
Hi,
i found a solution. Just put a empty menu form at previous position. In the open event you put the following code. the refreshed must have an input variable for $kontaktklid. thats all
$flddate1=date("Y-m-d");
$fldtime1=date("G:i");
$UserID = get_session("UserID");
$db->query("INSERT INTO kontakte VALUES ('','','$flddate1','$fldtime1','','','$UserID','','','','','','','','','')");
$last = mysql_insert_id();
header("Location: inbound_call_kl_0.php?kontaktklid=".$last);
|
|
|
 |
|