|
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
2011-07-08, 01:22 AM | #1 |
And Lord, we are especially thankful for nuclear power, the cleanest, safest
energy source there is. Except for solar, which is just a pipe dream Join Date: Sep 2008
Posts: 229
|
PHP Includes - Different Data, Same File, Different Pages?
Is it possible to include different data from a single file on different pages?
Supposing I have measurements for different models in a single file, is it possible to display their respective measurements on their respective pages? If yes, would you be kind enough to tell how or direct me to a tutorial on how to do it? Thank you in advance. Last edited by A.J. Angel; 2011-07-08 at 01:56 AM.. |
2011-07-08, 10:01 AM | #2 |
Me fail English? That's unpossible!
|
Very basic.
Passing an argument because the file holds different stats Code:
<?php include("http://www.domain.com/dir/modelstats.php?name=AJAngel"); ?> and the modelstats.php is something like Code:
<?php $name = $_GET['name']; if ($name == "AJAngel") echo "AJAngel stats: blah blah blah"; ?> |
2011-07-08, 12:53 PM | #3 |
And Lord, we are especially thankful for nuclear power, the cleanest, safest
energy source there is. Except for solar, which is just a pipe dream Join Date: Sep 2008
Posts: 229
|
Sweeet. That's even more simple than another provided to me. Thank you Wulf.
|
2011-07-08, 02:19 PM | #4 |
Are you sure you're an accredited and honored pornographer?
Join Date: Sep 2008
Posts: 67
|
Hi,
The example I cooked up is a bit more complicated but after looking at http://www.exquisiteangelz.com/ it looks to me like it might be better tuned to your needs. The examples including source code can be found at the following links: http://development.toosxxx4.com/smal...e/katy-parker/ and http://development.toosxxx4.com/smal...erly-phillips/. If you have any questions you can PM me as well as replying here. I do both server side and client side programming but do more Perl than PHP. I welcome any ideas for improving my solution. A text/php file solution may be OK for a few hundred models but if the volume gets bigger an indexed database system like MySQL or SQLite may work better. Good luck, fg Last edited by flowersgone; 2011-07-08 at 02:42 PM.. |
|
|