Retrieving from Multipart Form

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
AliasBDI
Forum Contributor
Posts: 286
Joined: Fri Nov 15, 2002 10:35 am
Location: Spring, TX, USA

Retrieving from Multipart Form

Post by AliasBDI »

I have a form that submit both a file and some input text. I know that PHP retrieves the file from the form using $_FILES, but how can I retrieve the text from input fields like in a $_POST?

Thanks.
User avatar
kaszu
Forum Regular
Posts: 749
Joined: Wed Jul 19, 2006 7:29 am

Post by kaszu »

<form ...>
<input type="text" name="my_input" />
...
</form>

Code: Select all

if (!empty($_POST['my_input']))
    $my_input_value = $_POST['my_input'];
else
    $my_input_value = NULL;
AliasBDI
Forum Contributor
Posts: 286
Joined: Fri Nov 15, 2002 10:35 am
Location: Spring, TX, USA

Post by AliasBDI »

Ahh ... I had some other problems. It worked.
Post Reply