Upload all of your images into a folder named ebookimages or something like that on your hosts server.
You would then have a table in your database called ebooks. Within that table you would have the fields id (primary key, auto increment), ebookname, ebookimagelink, ebookdownloadlink, ebookdescription.
Note: The id field is so that every ebook has a unique id, each time an ebook is submitted to the table, that field tells your php script which record you are looking for.
From there it is a matter of putting stuff in the database with SQL (can be done in phpMyAdmin) and retrieving those records with PHP in a list using condition functions such as if(), else(), and while(). example..
Code:
This would display all of the ebook names within your ebooks table of your database.
// connect to database
// select table
// give your variables some value, for example tell your script that $ebookname means to pull from a specific field.
while(id > 0) {
echo "$ebookname";
}
Please excuse me if any of the syntax is wrong, I am a bit rusty on my php.
You can create a php script to add ebooks to the database using SQL through your web browser. This is how people create admin panels.
I do not know how much you know about PHP, and if you don't know any at all then you are probably wondering WHAT THE HECK IS THAT?!. If you don't know the basics, I would recommend doing some reading before you jump into it. Otherwise, you are going to end up with a huge headache. Trust me!
Last edited by WebTraffic; 07-30-2009 at 03:28 AM..
|