Greenguy's Board

Greenguy's Board (http://www.greenguysboard.com/board/index.php)
-   Programming & Scripting (http://www.greenguysboard.com/board/forumdisplay.php?f=15)
-   -   PHP Includes - Different Data, Same File, Different Pages? (http://www.greenguysboard.com/board/showthread.php?t=62328)

A.J. Angel 2011-07-08 01:22 AM

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.

HowlingWulf 2011-07-08 10:01 AM

Very basic.
Passing an argument because the file holds different stats
Code:



and the modelstats.php is something like
Code:

$name = $_GET['name'];
if ($name == "AJAngel") echo "AJAngel stats: blah blah blah";
?>


A.J. Angel 2011-07-08 12:53 PM

Sweeet. That's even more simple than another provided to me. Thank you Wulf. |waves|

flowersgone 2011-07-08 02:19 PM

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


All times are GMT -4. The time now is 02:39 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc