The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Input type file not working, why?
Gerry Roston
post May 4 2022, 09:53 PM
Post #1





Group: Members
Posts: 3
Joined: 4-May 22
Member No.: 28,338



I am beyond confused. Here is a some of my html code (which I copied using my browser’s ‘show source’ capability). Very simple.
CODE
<div style="width: 40%; float: right;">
  <label style="position: absolute; top: 250px;">File with new logo:</label>
  <input style="position: absolute; top: 280px;" type="file" name="LogoFile">
</div>

In my code, I have some PHP to gather the data that is inputted and store it in a database. The code works just fine. However, I added two lines to the code:
CODE
echo "checking filename:  ";
echo $_FILES['LogoFile']['name'];

and the filename comes back empty, despite my having selected a file. Even weirder, the code used to work, but only stopped working once I moved the code into the <div> and added the style stuff. I suspect that I am missing something trivially easy – can you please point me to a solution.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 19th May 2024 - 12:23 PM