Welcome to BeerMoneyForum.com - BIGGEST MAKE MONEY FORUM ONLINE

Join us now to get access to all our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, and so, so much more. It's also quick and totally free, so what are you waiting for?
Blue
Red
Green
Orange
Voilet
Slate
Dark
  Guest viewing is limited

Help in php

K

kaphokz

Guest

Hello, I have a project website. Now I can upload files and the files will go to another folder. My problem is I cannot download it. :( Please help me. When I click the link that I created nothing happens
 
<a href="/images/myw3schoolsimage.jpg" download>
<img border="0" src="/images/myw3schoolsimage.jpg" alt="W3Schools" width="104" height="142">
</a>

try it
It will not work when some people have their own file. I need a code that will show the user their files and they will download it
 
I have one directory only, And each file has an id (In database) and each users has own file, now I want to show the users file based on its ID. So this will happen Id (of user) == id (of file).
You must set properly your database structure first.
1 user can have multiple files, right?
So based on that, let's say you have a table on your database named "files", and its columns are "id", "user_id", etc..

Then you just need to query on your database like this "Select * from files where user_id = 1" (let's say user's id is 1).
Then it will give the files of a specific user. With that, you can loop or its up to you if the response from that query is an array or not.

<a href="/uploads/file1.png" download>Download file</a>
 
You must set properly your database structure first.
1 user can have multiple files, right?
So based on that, let's say you have a table on your database named "files", and its columns are "id", "user_id", etc..

Then you just need to query on your database like this "Select * from files where user_id = 1" (let's say user's id is 1).
Then it will give the files of a specific user. With that, you can loop or its up to you if the response from that query is an array or not.

<a href="/uploads/file1.png" download>Download file</a>
You are absolutely right.
Select * from files where id="unique id of the user"
It can definitely view / fetch all the files of the specific user.
 
Learn the term one to one, one to many & many to many relationships in database world.
The way you build it could work, as prefer. But it when you want to expand you will see that big wall's will come up very fast.
 

📢 Recommended Partners

MGID - Native Performance & Programmatic Advertising Platform MGID Team
0.00 star(s) 0 ratings
Updated
Roobet.com | Crypto’s Fastest Growing Casino 🦘 Roobet.com
0.00 star(s) 0 ratings
Updated
Duckdice.io - Top Crypto Gambling - Bitcoin Dice DuckDice.io
0.00 star(s) 0 ratings
Updated
BMFAds.com - Advertise and Monetize Your CPC, CPM, POP Traffic BMF Staff
4.00 star(s) 4 ratings
Updated

banner

REWARDS: Active Raffles


  • 🤑 Roll 3: Win 100,000 BMF Points!

    The entry period for this raffle ends in..
Back
Top Bottom

Earnings Disclaimer:  All the posts published herein are merely based on individual views, and they do not expressly or by implications represent those of BeerMoneyForum.com or its owner. It is hereby made clear that BeerMoneyForum.com does not endorse, support, adopt or vouch any views, programs and/or business opportunities posted herein. BeerMoneyForum.com also does not give and/or offer any investment advice to any members and/or it's readers. All members and readers are advised to independently consult their own consultants, lawyers and/or families before making any investment and/or business decisions. This forum is merely a place for general discussions. It is hereby agreed by all members and/or readers that BeerMoneyForum.com is in no way responsible and/or liable for any damages and/or losses suffered by anyone of you.