iphetamine Posted February 12, 2009 Share Posted February 12, 2009 I have basic knowledge of php, (echo, variables, strings, etc.) but really don't know how to begin a site that's php driven. I already have a site i designed using HTML and CSS, how can I convert it to php? Or should I code the entire into php? I will later add some applications using PHP and MySQL on that site. I might have misunderstanding something, I can have a regular HTML/css site with some php codes to drive data from databases using mysql, but what i want is to be php only, is that possible? Plz enlighten me. THanks Link to comment https://forums.phpfreaks.com/topic/144990-dont-know-how-to-start/ Share on other sites More sharing options...
MatthewJ Posted February 12, 2009 Share Posted February 12, 2009 With a php driven site, you still echo or print the html content to the page. Link to comment https://forums.phpfreaks.com/topic/144990-dont-know-how-to-start/#findComment-760786 Share on other sites More sharing options...
samshel Posted February 12, 2009 Share Posted February 12, 2009 There is no point in making "php only" site. As matthew suggested even if you echo or print all HTML, the output the browser will be HTML anyways. PHP is an embedded language and should be used thus. You can use it for showing dynamic content on pages wherever necessary. hth Samshel Link to comment https://forums.phpfreaks.com/topic/144990-dont-know-how-to-start/#findComment-760789 Share on other sites More sharing options...
Twister1004 Posted February 12, 2009 Share Posted February 12, 2009 For a PHP driven site, I would suggest you learn SQL as well, for database contact =). a fully PHP driven site is not as easy as it sounds. Just make a page in HTML Then add some PHP content inside where you need it. It is good practice. Link to comment https://forums.phpfreaks.com/topic/144990-dont-know-how-to-start/#findComment-760822 Share on other sites More sharing options...
Mchl Posted February 12, 2009 Share Posted February 12, 2009 There is no point in making "php only" site. As matthew suggested even if you echo or print all HTML, the output the browser will be HTML anyways. PHP is an embedded language and should be used thus. You can use it for showing dynamic content on pages wherever necessary. hth Samshel Actually... I'm writing PHP based application and the source files for it have only 6 or so lines of HTML. All the rest is generated by external JS library. Link to comment https://forums.phpfreaks.com/topic/144990-dont-know-how-to-start/#findComment-760823 Share on other sites More sharing options...
iphetamine Posted February 12, 2009 Author Share Posted February 12, 2009 For a PHP driven site, I would suggest you learn SQL as well, for database contact =). a fully PHP driven site is not as easy as it sounds. Just make a page in HTML Then add some PHP content inside where you need it. It is good practice. Yeah, that's what I'm ending up doing. I know mysql, don't think I'll learn JS. Link to comment https://forums.phpfreaks.com/topic/144990-dont-know-how-to-start/#findComment-760831 Share on other sites More sharing options...
samshel Posted February 12, 2009 Share Posted February 12, 2009 It can be done Mchl..i am trying to say PHP is not meant to display HTML. Output for a webpage will always be HTML whatever way you choose to display it.. we can directly display HTML, user PHP to echo it, use JS to document.write it or use ASP to print it...i hope you agree. Link to comment https://forums.phpfreaks.com/topic/144990-dont-know-how-to-start/#findComment-760832 Share on other sites More sharing options...
Mchl Posted February 12, 2009 Share Posted February 12, 2009 This I do. I just don't agree with your saying "PHP is an embedded language and should be used thus". Or maybe I just misunderstood what you mean by 'embedded' [edited] typo Link to comment https://forums.phpfreaks.com/topic/144990-dont-know-how-to-start/#findComment-760879 Share on other sites More sharing options...
samshel Posted February 12, 2009 Share Posted February 12, 2009 i think we are on same page , dont worry conclusion is he should not echo out all HTML Link to comment https://forums.phpfreaks.com/topic/144990-dont-know-how-to-start/#findComment-760882 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.