Skip to main content
Participating Frequently
September 29, 2010
Answered

ASP to PHP I've seen the light

  • September 29, 2010
  • 2 replies
  • 906 views

Hi all, as a php newbie I just need one small answer yes or no.

My company has a number of websites considered catalogues in our db, all these websites run on the ONE mssql database

When a website is accessed the global ASA sets a session variable called catid unique for that site.

When a user searches for products in say our toy website, it queries the products stored proceedure with the unique catid and brings back toys, when someone visits say our book website, the different catid queries the products stored proceedure and brings back all the books.

Doing it this way allowed me to maintain only one database, yet have as many websites as I liked using the same structure of calling a stored proceedures making it dead easy to create new websites, eg toy websites, sporting goods etc for all the products my company imports.

Now that classic ASP is a dead end, I'm moving over to PHP and MySql.

PHP has no global ASA I'm currently aware of, so the simple question is . . .

Can I achieve the same concept in PHP MySQL without tearing my hair out, it was relatively easy with Dreamwever server behaviors for mssql but dreameaver does not support the same behavor (as far as I can tell) for MySql

Appreciate all comments

- remy -

This topic has been closed for replies.
Correct answer Lawrence_Cramer

Welcome over to the "light side"  The demise of ASP has been a long drawn out death. I absolutely amazes me how fast the web can change and move forward, yet at the same time some elements of the web can take forever to die... (traditional ASP, and IE6 as examples)  But time marches on.

One thing I really wish PHP had was a "global" file that it would call on every page request, ASP had Global.asa and ColdFusion has Application.cfm or Application.cfc.  These files are invaluable in easily setting variables that are readily available to the entire application, but alas no such wonder exists in PHP at this tile. So you are forced to create your own Global settings file and then remember to include it at the top of every page.  I sure wish PHP would address this. It's one of the reasons I favor CF over PHP.

--
Lawrence Cramer - *Adobe Community Professional*
http://www.Cartweaver.com
Shopping Cart for Adobe Dreamweaver
available in PHP, ColdFusion, and ASP

Stay updated - http://blog.cartweaver.com

2 replies

RemyBlairAuthor
Participating Frequently
October 6, 2010

Thanks for the help guys, I played around with ASP.Net some time ago, but just felt I might be painting myself into a corner. PHP seemed a better option allowing my sites to continue to work on MsSql while I slowly moved it all over to MySql and be platform independent. It's been quite easily really, the only hassle was my dependence on the global.asa.

And thanks for the advice on Wordpress etc, I'll checkout the structure

cheers

Lawrence_Cramer
Lawrence_CramerCorrect answer
Inspiring
October 1, 2010

Welcome over to the "light side"  The demise of ASP has been a long drawn out death. I absolutely amazes me how fast the web can change and move forward, yet at the same time some elements of the web can take forever to die... (traditional ASP, and IE6 as examples)  But time marches on.

One thing I really wish PHP had was a "global" file that it would call on every page request, ASP had Global.asa and ColdFusion has Application.cfm or Application.cfc.  These files are invaluable in easily setting variables that are readily available to the entire application, but alas no such wonder exists in PHP at this tile. So you are forced to create your own Global settings file and then remember to include it at the top of every page.  I sure wish PHP would address this. It's one of the reasons I favor CF over PHP.

--
Lawrence Cramer - *Adobe Community Professional*
http://www.Cartweaver.com
Shopping Cart for Adobe Dreamweaver
available in PHP, ColdFusion, and ASP

Stay updated - http://blog.cartweaver.com

RemyBlairAuthor
Participating Frequently
October 3, 2010

Thanks Lawrence,

I've been doing that via a template page but I wasn't quite sure if there was a better method.

Thanks for your help

Cheers

Remy

Inspiring
October 4, 2010

Many of the larger frameworks and CMS systems (Zend, Joomla!, WordPress, etc.) route all requests through the main "bootstrap" index.php file, which then acts like a global file where any of the shared variables, constants and includes can be declared. I usually end up doing the same these days for my own systems.