Jump to content

[SOLVED] Just echo-ing out file size, type, name


ryanschefke

Recommended Posts

Can someone please tell me what I am doing wrong? Ultimately, I am trying to store the name of a file in mysql to reference it in html. i try to do simple things such as echo the size and name of the file but it outputs nothing. please help. The full script is in the link below. my email is [email protected]

 

http://phpfi.com/278267 

You need to specify an enctype in your form:

 

<form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="formnewuser" id="formnewuser">

 

Without that, the server isn't expecting file as well as the other form data.

I just ran a few more tests. The name, size, etc of the file output is now working; however, the redirect stopped working. In other words, when everything is filled out okay I want to use the following line: header ('Location: signupthanks.php?un='.$un.'&em='.$em); to send the user to another page. It was working but it 'magically' stopped and just refreshes back to the same page.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.