How to make a download website using php
How to make a download website in phpPlease follow the below steps to make a download website very easily.
Normally one makes a download website using .html pages.This causes there to be thousands of pages.
However with this trick you will be able to create a download website easily with just 3-4 pages and using the dynamics of php.
first
You will need to create tables.
The main tables will be
1.User registration.( this one is not necessarily needeed)
2.Other table will be a download table.
3.Incase you will like to have more functionality you will need to add tables as per your needs.
You can create these databases directly from the database phpmyadmin or you can create them using pho(sql statements in the code)
Create the table downloads
you will need to add the following main colums
1.
download_id,downloadname,downloadlink,download_link_twoYou will need to write the php code
Yes you will need to write the php code as well
you will need to write this for two main reasons.
1.First to populate the tables will the relevant data
Inorder to do this you will need to create a simple php form.Where you will send data to a page and the data will be inserted using an INSERT statement.You will get many simple examples online about inserting data to mysql through form
2.You will need to need to display this data on the pages.
Now this is the catch..There are so many items that can be downloaded.But how do you show them on one page?
Things you could do.
You can insert the ids in the URL and get the value of the product id using $_GET['id'] for eg
you will need to add ?id=$varible_id for the product links respectively.
Search about querystings in php you will get the trick
Ok so if you have any doubts or questions please comment below.
.png)





0 comments: