You are here: Re: [newbie] how to style form with css? « PHP Programming Language « IT news, forums, messages
Re: [newbie] how to style form with css?

Posted by Bent Stigsen on 01/23/06 19:40

A.Translator wrote:
> Bent Stigsen schreef op 23-1-2006
>
>> er definition, "PHP is a server-side HTML embedded scripting
>> language.", which basically means that, if you take a html-page, and
>> change the extension to .php, then that page is a perfectly valid
>> php-script. You could embed PHP-code whereever you want on the page
>> and optionally output something at that place.
>
> What does 'optionally output' mean?

Perhaps it is a little too obvious to make sense. I just mean that you
don't necessarily need to add anything to the page. That is, you can
have <?php $a='hello'; ?> at one place and <?php echo $a; ?> at
another place.

>> PHP can actually output any type of document/data, however for
>> embedded scripting, it is limited to document-formats that does not
>> collide with the PHP open/close tags.
>
> What do you mean with 'collide'? I have seen several <font> tags within
> the php open/close tags, byt that is obviously not what you mean.

When PHP parses through the page, it looks for "<?php" (or "<?", "<%"
if configured so) and starts interpreting PHP-code from there on,
until the closing-tag "?>" is reached. So if those tags occur
naturally in a certain document-format, then that is a problem
(although manageable). It is not unlike in the html-standard, where
they have to use &lt; and &gt;, to avoid confusion with ordinary tags.
As long as your html is valid, there is no problem with PHP.

>> To answer your original question, when using php as a server-side HTML
>> embedded scripting language, the browser will not see any difference
>> between requesting a html-page or a php-page, other than the extension
>> of course. Stylesheets are handled by the browser, unrelated to the
>> php-code at the server or the extension of the requested file.
>
> So I should be able to link.

Yes, PHP is not an obstacle for anything you would like to do in html.
Think PHP as the process you do when composing a new html-page. You
start out with a blank page or a template, write a little here and
there, save it to the disk, and then open the file in a web browser.
Instead of saving to disk, PHP send the page back through the web
server to your web browser. At the point where the web browser is
presenting the html-page, you (and PHP) are out of the equation. If
something is wrong with the html-page, you go back, review your steps
in composing the html and fix it. Similarly you would review the
PHP-code and fix the error there.

> I'll try again.

If you are completely new to programming, then take it real slow.
Start out with a classical "hello world". Even if it is of no real
practical value and may seem silly, it will give you the psychological
success of "hey, this works, and I did it".
http://www.google.com/search?q=%22hello+world%22+php

Before throwing yourself too much into it, take some time to read up
on concepts of datatypes, control structures, functions and program
flow in general.


/Bent

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация