Print form with: 1.photo in the post 2. id auto increment generated in the form Insert. How is it in PHP?

Asked

Viewed 48 times

3

At the time of registration of the form the user will put the photo, so far so good.

My problem is that I need to print this form already with the photo and the id auto increment of the database. The idea was to register the data 60 fields along with the photo and at the end of this registration a Ubmit boot and the event of printing.

I’ve used window.print and so I can’t recover the photo or the id I only print what was typed.

1 answer

1


In your form, when sending it, you can use the foreach to register the data in the database, according to 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 id, to show on the page. That this is the goal.

Remember that the field name of your form should be the same name that is in the database.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.