We run a sailing school. A student selects a course from a menu, and WP (via a hyperlink) invokes a php progam in another part of our site) that displays the schedule for that course. He can then register for the course. The hyperlink contains the path to the php program to run, as well the course name and a couple of other things
We now want to run a school at another location, with a different set of courses and schedules. I have multisite running on a test system, with two sites … the original, and the new one.Both sites look the same, with minor differences. The php programs that get called need to know which site is running, so they use the proper database for that site..
Is there any way WP Multisite can pass this information on, perhaps via a cookie, that the php program could read? I already have written a plugin that sets a cookie via a hook. If there was a hook that could be invoked when one of the sites started up, I could easily set a cookie that the php program could read.
One option is to add a site parameter to each hyperlink, but that requires changing a LOT of hyperlinks, and is an error-prone process.
Any suggestions would be appreciated. MultiSite appears to be exactly what we need.
- The topic ‘Inform php programs called from WP which site it is’ is closed to new replies.