Quote:
|
Originally Posted by _mg_
I tried implementing an instruction a tutorial gave me by going to my blank website page and on MS Frontpage, going to the HTML section and putting in the script the tutorial told me to and then I saved it, uploaded the site, and all I got back was the same script looking at me. No feedback form
|
This is due to the fact that php is an interpreted language, the webserver needs to parse the page (dont know any better expression) and call an enterpritor, in order to tell the server, that your page is containing some code, which needs to be enterpreted, you give the file an extension of
.php instead of
.html this tells the server, that it needs to parse the page through the php enterrpretor.
And your php-code is encapsulated by
<?php and
?> which tells the enterpretor, here is the actual code,m which needs to be run/executed.
This beeing said, it is only possible to serve php-pages, if the server supports it.. I don't know what your deal with your provider is, and what they accept (if they accept ASP instead of PHP) but your account needs to be setup to support php pages.
Quote:
|
Originally Posted by _mg_
Is there a strong basic knowledge I need to know before I get into LAMP? Can I just straight learn PHP first without knowing HTML? As I have been trying it, I feel like I'm missing something.
|
When displaying things in a web-environment, you need to send the html codes to teh browser, thus you need to send what ever output you want from your script formed through html layout.
With frontpage you get an easy way of dealing with how things look, the WYSIWYG effect, this is OK for just your static pages, but when making a dynamic page, you need to know how your html code is going to be formed after a run of this code, if you fetch 10 items from your database, then you know you only have to display those 10 items.. But if your fetch routine is random, and returns 8 or 9 or 2 items, then you need to understnad HTML enough in order to know your code is scalable to nomatter what type of output your dynamic page will produce.
When editign a page in frontpage, try looking at the "code" section instead of the WYSIWYG section, then you'll see all the magic thats behind it all, it is also in this code section you should be typing your php-code.