0

I am planning to make a form which has a form through which users can upload a file on the website. I used a CSS template where a class called pop-up-wrapper and pop up is defined. However, when I use the following code :

<div>
    <div class="form-pop-up">
        <div class="form-pop-up-wrapper">
            <ul class="contact-form">
                <form id="form-submit" method="post" enctype="multipart/form-data">

                    <li>
                        <p class="iam-white center-al">Upload file</p>
                        <input  type="file" name="resume" id="user-resume">
                    </li>

                    <li>
                        <p>&nbsp;</p>
                        <input type="submit" name="submit" value="Submit" id="form-submit" class="mar">
                    </li>

                </form>
            </ul>
        </div>
    </div>
</div>

I have a PHP code which validates if any file has been entered by checking with

isset($_FILES['file']

but this always returns 0. Is there anything in the CSS stylesheet which can lead to this situation where $_FILES is unable to catch the uploaded file?

TIA

0

2 Answers 2

1

You have to use the name in $_FILES, not the type.

isset($_FILES['resume'])
Sign up to request clarification or add additional context in comments.

1 Comment

You just beat me! Nice one!
0

Just a shot here, but I don't think it's your CSS that's causing the problem. Try:

isset($_FILES['resume'])

instead.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.