No announcement yet.

Can php pages have normal html

  • Filter
  • Time
  • Show
Clear All
new posts

  • Can php pages have normal html

    For a content management system that I want to use, I need to put php code into my website. My website is all HTML, CSS and a little bit of Javascript.

    So I just want to make sure I got everything correct.

    All I have to do is put the PHP code into my webpage. and then instead of saving the page has .html I save it has .php


    So all of the html and css will work the same way the only difference with my page is that it is .php right?


  • #2
    Thats Correct.


    • #3
      Can php pages have normal html

      Yes PHP page have the plain HTML tags. PHP uses HTML as the basic language so PHP is also written in the plain HTML .


      • #4
        Yes you can do it


        • #5


          • #6
            yes it is......


            • #7
              I like how spammers post threads like these. It makes it too obvious.


              • #8
                Re: Can php pages have normal html

                Just in case anyone finds this thread...

                HTML, CSS and Javascript code can be embedded in PHP files. The code which is not visible to the end user is of course the PHP code, which is parsed by the PHP interpreter that resides on the server (e.g. your shared hosting account). PHP scripting code is nested in <?php ?> code blocks. For example:

                PHP Code:
                echo "<p>Hello world</p>";
                This doesn't actually do anything particularly useful; it does something which you can do without PHP in standalone HTML files (static pages). PHP files are "dynamic pages", because what the end user sees on your website depends on what your application does and based on the actions of the user on your website. If they submit a login form, and your PHP application is created to check the values of data from the HTML form that was sent over to the server, and your application verifies the authenticity of the login details (e.g. through a database - MySQL, etc.) the "logged in user" may be presented with the member area which guests on your website (users who are not logged in) do not see. Your PHP application can be set to determine whether a user is logged in and is permitted access to the member area or not. These are "dynamic pages". This wouldn't be possible with HTML and CSS alone; which are the languages you use to structure and create the presentation/design of your website.

                You can find a variety of PHP tutorials in our Programming and Web Development Tutorials forum.