views:

17

answers:

2

I'm trying to create a form that will show the id that the record is going to have, prior to hitting submit on the form. For example, if I have a form to create a new project, and the previous project was id 3, I want the new project form to autopopulate with 4, so that I know that it's going to be 4 before I submit the form.

Thanks for any help you can provide!

--Mark

A: 

You can't really do this if you are using an auto_increment without actually creating the record in the database first. You might therefore need to use a different strategy to generate the id for the record.

Toby Hede
A: 
John