FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Managing php pages





valkyrie-heavens
I wanna be able to manage my pages so that if I have more than one page for a certain part of my website (eg. avatars for a graphic site) i can have a certain amount of avatars per a page and the pages will atomatically determine that the newest are on the first page and what not... take this site for example. http://www.digik.net/avatars/series/13. I just dont wanna have to do it all manually. Im not sure if I would use a content managment system, some kind of php coding, or something else...
thnn
put all the filenames in a database and then just use a pagination script that will select a limited amount of avatars and display them depending on what page you are on.
valkyrie-heavens
pagination script?? I have no clue how to do anything u said... what do u mean put the files in a database??
alalex
Create a new database in MySQL. Save in it the names and locations of the pics. Then, with php, take only for the web the 10 upper pics, and display them.
When i get a host, i will create a sample web. Was that helpful at all?
valkyrie-heavens
yes, i understand a bit better. I only know a bit about MySQL. Would u know any websites that have some good tuts about MySQL in them?
alalex
Check this, maybe is helpful:
http://www.w3schools.com/php/default.asp
snowboardalliance
Sorry to be off-topic but can you post in a color other than orange? It's really hard to read.
valkyrie-heavens
I managed to create the database and all that stuff so the graphic id, artist, etc is show. But how do I add the the actual image???
Gieter
valkyrie-heavens wrote:
I managed to create the database and all that stuff so the graphic id, artist, etc is show. But how do I add the the actual image???


Do you have a field which actually contains the location of the image?

If you have that, you then should make an MySQL-query to get out by example the first thirty images out of the database. You can do it like this:

Code:
$result = mysql_query("SELECT * FROM images LIMIT 1,30");
while(mysql_fetch_array($result) = $row)
{
    echo "<img src='". $row['location'] ."'><br><br>";
}


This piece of code (haven't tested it) should return the first thirty images in your database.
valkyrie-heavens
Gieter wrote:
valkyrie-heavens wrote:
I managed to create the database and all that stuff so the graphic id, artist, etc is show. But how do I add the the actual image???


Do you have a field which actually contains the location of the image?

If you have that, you then should make an MySQL-query to get out by example the first thirty images out of the database. You can do it like this:

Code:
$result = mysql_query("SELECT * FROM images LIMIT 1,30");
while(mysql_fetch_array($result) = $row)
{
    echo "<img src='". $row['location'] ."'><br><br>";
}


This piece of code (haven't tested it) should return the first thirty images in your database.


Thats what im not sure of. I do not know how to add the location of the images to the database.
Related topics
Do we support php include and/or SSI?
problems for indexing php pages in google.
PHP
PHP and SEO
PHP VS ASP
live chart / graphic in php pages
Rebuilt site using php, google seems confused
one line securing of php pages (login of users) (user auth)
Perl modules in PHP?
SEO/ publish my php website
How do i host my PHP pages?
HTML vs PHP pages?
long php pages or include
Mysql and PHP separately to work on windows 7
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.