GET $7 FREE!

Welcome to BeerMoneyForum.com - We Help Each Other to Make Money 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?
Esfaucets.com - Best place to earn crypto 24/7
Generate Passive Bitcoin From Merchant Transaction
Cryptocurrency Mixing Service
Kintum - best trading bot
www.KnowHowToEarn.com/bmforum
MyLead - start earn money
Make short links and earn the biggest money
GET $7 FREE!
Casino / Exchange / Faucet / Bankroll Investments
Monetize or Advertise with AdsKeeper
MyLead affiliate network
Clipwatching.com : Make Upto $50 per 10k views

Help in php

Play With Your Credit Card!
Casino / Exchange / Faucet / Bankroll Investments
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
 
Ideal tool for trading on multiple exchanges

Nico Bayno

Silver Member
Joined
Nov 25, 2017
Messages
101
Reaction score
11
Age
25
Location
Carmen ,Philippines
BMF Points
220
Rating - 0%
0   0   0
<a href="/images/myw3schoolsimage.jpg" download>
<img border="0" src="/images/myw3schoolsimage.jpg" alt="W3Schools" width="104" height="142">
</a>

try it
 
K

kaphokz

Guest
Rating - 0%
0   0   0
<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
 
K

kaphokz

Guest
Rating - 0%
0   0   0
You mean users have directory for their own file?
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).
 

Nico Bayno

Silver Member
Joined
Nov 25, 2017
Messages
101
Reaction score
11
Age
25
Location
Carmen ,Philippines
BMF Points
220
Rating - 0%
0   0   0
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>
 

zeljko

Emerald Member
Joined
Nov 5, 2017
Messages
1,399
Reaction score
95
Age
31
Location
Croatia
BMF Points
2,156
Rating - 0%
0   0   0
If one user have more files, then statement Id (of user) == id (of file) won't work. @Nico Bayno give you good advice. If you can't solve, give us screenshot of database structure.
 

Babarbaig668

Gold Member
Joined
May 1, 2020
Messages
307
Reaction score
14
Age
28
Location
Pakistan
Website
www.youtube.com
BMF Points
434
Rating - 0%
0   0   0
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.
 

mrCortex

Newbie Member
Joined
May 18, 2019
Messages
4
Reaction score
0
BMF Points
119
Rating - 0%
0   0   0
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.
 
shape1
shape2
shape3
shape4
shape7
shape8
Top

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.