Submit a form using request in php

1

Good morning people,

I'm doing a form (course work) and I need to echo all the information typed in the form using REQUEST (it can be POST too) when I click the "submit" button.

I searched a lot on the internet, I saw several videos, but I just think how to do this given the given, type, making a line of code for each die ... but they are soooo data on the form and I remember that my teacher made a line only which printed all the typed information, but I do not remember how it did it.

    
asked by anonymous 05.09.2018 / 15:13

1 answer

0

In addition to the options suggested by Fernando ...

If you need to echo all the information typed in the form I would do so:

echo implode(" ", array_slice($_REQUEST,0,count($_REQUEST) - 1));

The array_slice will get everything typed except the submit. While implode will join all values of array elements by putting a space between them.

    
05.09.2018 / 16:28