English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have a Pokemon Diamond/Pearl fansite www.trainercommunity.net

I want to make a "pokedex" on the site. Each pokemon (there are around 400) will have it's own page. All the pages will have the same layout, except they will have different pictures (depending on which pokemon it is for). Is there a way that I can make just 1 page, and depending on a variable that is in the address bar, the page will display the correct info?

2007-06-28 09:00:40 · 4 answers · asked by I got Answers 2 in Computers & Internet Programming & Design

4 answers

The only way I know of and would suggest is to make use of a database like MySql. (because of the amount of data)

Create a table with the detail of each Pokemon listed and then in your PHP code you set a mysql filter that will then give you the data of that one Pokemon that you want to display.

Some thing like: (the filter)
$New="SELECT * FROM Pokemon WHERE Name = '$Pokemon_name'";
$result = mysql_query($New);
$num=mysql_num_rows($result);

Display it like:
$Powers = mysql_result($result,0,'powers');

Hope this helps.

(If you do not Know PHP or My SQL search the web for free tutorials.)

2007-06-28 09:18:56 · answer #1 · answered by Anonymous · 0 0

I had a similar problem...bunch of photo enlargements from all over a website...same html to show an enlarged photo+caption...seemed like a waste of time to have a bunch of html files lying around!

So I wrote a simple php file to accept three parameters: height, width, caption-string. It then sets variables appropriately, and writes a "here" doc (print << ) containing all the html, linking to an external style sheet...

2007-06-28 09:49:54 · answer #2 · answered by fjpoblam 7 · 0 0

If it works then sure it rather is right. yet you will could try this type of coding on each web site that demands logon in case the consumer attempts to pass directly to between the logged in pages. you're able to no longer have logged on content fabric on the index web site. Your index web site could be one which seek engines can index. have exciting.

2016-10-19 02:49:58 · answer #3 · answered by Anonymous · 0 0

Along with PHP, use CSS to customize pages. Also consider AJAX. Some helpful links are listed below!

http://www.php.net/
http://www.miniajax.com/
http://www.w3.org/Style/CSS/
http://csscreator.com/?q=version1/index.php

Best of luck!

2007-06-28 09:06:09 · answer #4 · answered by Michael 4 · 0 0

fedest.com, questions and answers