HTML > PHP - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Skype & Technology (/forumdisplay.php?fid=9) +---- Forum: Tech Talk (/forumdisplay.php?fid=17) +----- Thread: HTML > PHP (/showthread.php?tid=68921) HTML > PHP by Eddie on 11-28-2006 at 01:55 PM Hello everyone, i have made a page in HTML that actually needs to be coded in php, is there a way to easily convert the code?? RE: HTML > PHP by xJ + on 11-28-2006 at 02:00 PM You might want to try this RE: HTML > PHP by Adeptus on 11-28-2006 at 02:03 PM
There is nothing to convert. PHP pages still contain HTML. PHP is nothing more than a way to enhance an HTML page with some code that will execute server-side when the page is requested by the browser. So, all the "conversion" it takes is changing the extension to ".php". RE: HTML > PHP by RaceProUK on 11-28-2006 at 03:21 PM And of course there's php.net, which has the full documentation for all of PHP. RE: HTML > PHP by absorbation on 11-28-2006 at 04:56 PM
HTML and PHP are very different. HTML is used for your browser to pick up on read-able code and form objects using it, which is what you see on your screen. PHP is a server addon designed to allow dynamic content. It basically is a web server language, in a syntax similar to C. code: Of course you can't do this with HTML. PHP is something needed to be installed on a server, whereas HTML code is something all up to your browser. The 'echo' used shows the HTML code like you would normally, but the PHP checks to see what code should be echoed Edit: There is no such thing as converting HTML to PHP, and your best chance is to post your HTML page and explain what is not working RE: HTML > PHP by RaceProUK on 11-28-2006 at 07:18 PM
You can also do dynamic content with HTML, by leveraging JavaScript, but the beauty of PHP is that your code remains hidden from the browser. code:is a little more efficient. Though a little harder to read. Edit: @ Mike RE: HTML > PHP by Mike on 11-28-2006 at 07:21 PM
quote:And, that the user doesn't need to have Javascript enabled to see the website RE: HTML > PHP by rav0 on 11-30-2006 at 10:33 AM
quote:Rename the Page to end in ".php". When it's requested by a browser, it'll come out exactly the same (unless there are PHP start marks ("<?php" or "<?" with short tags enabled in PHP) in the page code). You can add bits of PHP where they need to go into the existing code. This post looks long, but it's simple and only looks long because there's lots of space. Have a read of the examples below. awesome.html: code:gives: quote: awesome.php: code:gives: quote: awesomer.php code:gives: quote: |