CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 dynamic content for stanford/harvard entrepreneurs sites

Print topic Send  topic

Author Message
frankms

Posts: 2
Posted: 12/17/2004, 12:37 PM

i'm new at ccs; just started a site called www.stanfordentrepreneurs.com based on the portal example.

now would like to expand site to other universities, but keep maintaining one codebase.

I would like to accomplish this by setting a session variable based on the site URL that was used (eg stanfordentrepreneurs or harvardentrepreneurs) and subsequently pull different content out of the database based on this session variable.

this must be relatively easy to do (?!); could anyone point me to an example?

also would like to change the logo on the header html page based on this session variable.

would this variable stay the same even if browing the site and coming back to the default.php site from a link within the site? (i.e. through a cookie or so?)

thanks for your help,

Frank
View profile  Send private message
peterr


Posts: 5971
Posted: 12/17/2004, 3:30 PM

You can place some code in Common.php where you can read the PHP variable that contains the domain name (I think its 'SERVER_NAME', see http://www.php.net/manual/en/reserved.variables.php ), then create a session variable based on that. The session variable will stay unchanged on all pages, especially if set in Common.php. You can also use that PHP variable since it's there at all times.

You can then easily filter grids by creating a parameter in the Data Source that specifies that some field in the database must be equal the new session variable. The parameter type would need to be set to "Session".

You can implement the logo as a label and use the CCDLookUp function to retrieve the correct image link from the database based on the value of that session or 'SERVER_NAME' variable.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
frankms

Posts: 2
Posted: 12/17/2004, 6:13 PM

Thanks!!

That was helpful,

Frank
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.