Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Nov 2001
Posts: 745
Admin Emeritus
Admin Emeritus
Offline
Joined: Nov 2001
Posts: 745
Here's an odd one:

I want to have page data for some pages stored in a MySQL table. The only problem is some of the pgaes contain some PHP bits in them. Am I trying to do the impossible or is this something possible.

Or is this something I should be accomplishing by calling a function in classes. If that is the case, how would I take a query string to call a function dynamically.

For example, if my query string was ?fetch=somepage then how could I call a function in the class fetch called somepage?

Sponsored Links
Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
Not exactly sure I'm following. Maybe I'm being dense, you know, the weekend and all If you can clarify a bit more , maybe some examples of what your storing and what you mean by php bits, I might be able to give some pointers


UBB.threads Developer
Joined: Nov 2001
Posts: 745
Admin Emeritus
Admin Emeritus
Offline
Joined: Nov 2001
Posts: 745
I'm talking about having Page data in a MySQL table. I attempted this early on in another project, and didn't fiddle to much with it due to time.

Essentially, I have some HTML, with a section of PHP in it, and tried to stick it in a DB, then retrieve it based off of query string and do the procedure.

I'm guessing I'm trying something totally insane. I was trying to rethink the way I'm assembling things totally, as my current stuff has a lot of duplicated code, and isn't very portable. Basically, I'm trying to find some alternatives to having a ton of includes. Especially for some functions of the script.

Maybe I would be better off generating pages based off of functions and classes. I mentioned in my first post the possibly of calling a class based off of the query string where I have like index.php?fetch=somepage and then index.php goes and finds Fetch::somepage and displays it. If I was to attempt this, how would I call Fetch::somepage without having a case block, or if/then blocks hard coded. If I go this route, I'd like to be able to just add a class and/or function, and the script is able to recognize it.

Last edited by Ron M; 03/13/2004 5:33 PM.
Joined: Nov 2001
Posts: 745
Admin Emeritus
Admin Emeritus
Offline
Joined: Nov 2001
Posts: 745
Ok, after research on the internet, and about an hour of changing, uploading, and testing, I figured out how to dynamically call functions inside classes.

I think that will work better to streamline things.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)