What is the best practice for inserting a record from a php form submit and returning the id of the record inserted back to the form for use in other processes. The below code is what I'm currently using, just trying to determine whats the best practice. Another method would be to code the insert within a php begin-commit transaction block in the web form rather than use this stored proc.
INOUT v_orderid INT ,
INSERT INTO order_header(
SET v_orderid = LAST_INSERT_ID();
select IFNULL(ord_id,0) INTO v_orderid