Print form with: 1.photo uploaded in post 2. id auto increment generated in form insert. In PHP has it?

3

At the moment of registering the form, the user will put the photo, so that's fine.

My problem is that I need to print this form already with the photo and the id auto increment of the bank. The idea was to register the data 60 fields along with the photo and at the end of that record a submit button and the print event.

I have already used window.print and thus I can not recover the photo nor id so I print what was typed.

    
asked by anonymous 10.08.2015 / 03:46

1 answer

1

In your form, when sending it, you can use foreach to register the data in the database, as the example:

foreach($_POST as $campo => $valor){
    echo "No campo $campo tem o valor $valor<br>";
}

With these values recovered and already inserted in the database, you can then check the last registered user to show on the page. That is the goal.

Remember that the name of the field on your form should be the same name as the one in the database.

    
10.08.2015 / 05:23