If i use mvc then I can template and avoid rewriting html. Css IS a template so templating systems can't "claim" that as an advantage. Con's I still have to hard code over 40,000 "routes" or the mvc won't work!!! I still have to hard code page specifics for the individual pages 40,000 times.
I doubt you have to hardcode 40,000 routes. You could set up CI to route all requests to a single controller and all requests to that controller can be handled by a remap function.
Second Possibility - Could I push php back down the hierarchy and only use it at the end? Leaving a portion of my front end that doesn't even need this language in any way shape or form alone!
Not sure what you mean by 'push php back down the hierarchy' but you can set up server-side includes to allow execution of PHP code within an HTML file. I seriously doubt you want to edit 40,000 static files to accomplish this.
Third possibility - Since it looks like I'll just hard code the 40,000 pages because obviously the data I need to retrieve from a data base would ONLY be specific to that specific page...Is their a way to use JS to communicate with a php page (that noone ever sees) so that php will do the job it was created for. Speak to the database and nothing more passing the results back to JS?
Perhaps you've heard of AJAX?
Since PHP doesn't have a solution that's going to miracle me out of intensive extended hard coding then I feel no allegiance to blindly placing PHP code on pages where it serves NO purpose. I want database exposure down to the bare minimum which dictates that you cant build the entire site from the language that's interfacing with your database. Geez!!!
I could be wrong, but I don't think there are any solutions that let you connect directly to a database from HTML or Javascript. Sounds like a security problem to me.
After 14 months of ME googling this problem, if there was an easy solution...I would've found it, trust me 😉
Wow. Were you able to sleep or eat? That's a pretty long shift.
I HAVE to use PHP to access a MySQL database.
Is this some requirement imposed on you by a boss or something? If not, you could also consider .NET, Java, Ruby, Python, Perl, or good old-fashioned cgi-bin.
People automatically jump to writing entire applications in one language (PHP) very dangerous for such a leaky language.
Well in defense of "People" I would say that PHP applications typically also involve other languages like HTML and Javascript and CSS. That said, having to write a server-side application in more than one language (e.g., PHP and C# and Java) sounds like a real nightmare.
So most people lack the knowledge to help me. Only one in maybe 10,000 developers would even attempt doing what I'm trying to do. And those are the boys with skills.
Given that there are only 141,000 web developers in the US, that means about 14 people on the US might attempt this. You are in rare company.
So what is the minimalist integration of php I can utilize to communicate with the database? Basically it will be an HTML5, CSS3
& JS site with it's tag along little brother PHP. But in the spirit of the original question...if MVC WAS the right choice then you got some explaining to do. Not that I don't believe you, but I speak matter of factually that CI & CakePHP CAN NOT get the job done!!! They can't!!!
I'd recommend reading the documentation on MySQLi. The example code is about as basic as DB connectivity gets in PHP. Also, I'm skeptical that your project's needs would preclude the use of either CI or CakePHP. If you truly believe it, perhaps you could clarify?