PHP - HTML & JavaScript basic knowledge,
[1-php] External JavaScript
[2.php]   Site Structure
    Editing
index.php [ 1 info 2 ]



These pages [...directory /basic/] start running on 3 initial PHP-FILES
[ index.php - 1.php - 2.php ]
This is the initial code :
Files index.php 1.php and 2.php do not show any html content if they are not opened in a PHP MySQL server environment.

<!--   Forum - Tutorial - watch.htm - Italian
Red tags embedding this text show how to comment html, the only limitation is that these cooments cannot be nested as shown in the red bordered table below.
-->
<!--
<!-- This would shoot an error in the HTML output.-->
-->

<hr width=99 size=7 color=blue>  
This tag and tag <br> do not require a closing TAG.
index.php   1.php   2.php

<!--index.php -->
<center><font color=green size=6>index.php</font></center>
<a href=1.php>1.php</a> &nbsp;
<a href=2.php>2.php</a>

<!-- 1.php -->
<center><font color=green size=6>1.php</font></center>
<a href=index.php>index.php</a> &nbsp;
<a href=2.php>2.php</a>

<!-- 2.php -->
<center><font color=green size=6>2.php</font></center>
<a href=index.php>INDEX</a> &nbsp;
<a href=1.php>1.php</a>
  Home Page   www.pr.orgfree.com   Tabella-ASCII   Web  Escape  JavaScript   Comments 








lesson 1 [ . . . WEB ]
  1. Copy the html code and save-rename as marked in red...
    index.php   1.php   2.php ]
  2. Create the directory vittorio [ or any wished name
    ...if you use different names then modify paths accordingly ]
  3. Set these files into [vittorio] - localhost/webserver
    Reach any related path via an http request http://localhost/vittorio/index.php
    ...www.your-domain/vittorio/index.php
    ... If all was done properly you will be able to surf in circle through these 3 FILES.
    Insert any text you like into those files ...add some HTML-TAGS e.g. :
    • <font color=blue size=7>...text [consult this link for colors-codes]</font>
      ...text dimensions [size] can be set with values from 1÷7
    • <div align=left>...text [align can be : left, right, center, justify]</div>
  4. As long as you use any html TAG or JavaScript, then PHP parser will output the result as in any HTML-FILE
  5. Open an e-mail account [yahoo - msn - google - www.email.it - www.tiscali.it - etc]
  6. Now that you have an address to get access data for a website you can ask a provider for a webspace.
    ...for example try here : www.orgfree,com - CATEGORY (text-banner)
  7. Till you get some experience on php-coding, set the PHP code at the very top of the source code.
  8. ...PHP code can include headers' instructions that must be set on top to function properly, as by cookies or re-addressing instructions for example.
To ask the server APACHE to consider text-lines as PHP-CODE you have to use the PHP TAGS that are :

<?# - test.php
$var="Contracted syntax for PHP-TAGS";
print"$var";
?>

<br>...here you can put html<br>
<?php
$_var="This is a standard syntax for PHP";
echo"$_var";
?>

<br>...here you can put again html<br>
<script language=php>
$VAR="PHP TAGS";
echo"$VAR";
</script>
<br>...and again html if desired.<br>

Just copy and paste all code above, save as test.php ...upload to your server and check : test.php

Top  Escape  JavaScript  Comments 




Lesson 1 [1.1 - Chars' Escaping]

To view any alphanumeric char (a ÷ z) (A ÷ Z) (0 ÷ 9) and many others just digit them in Notepad > save as extension.php or ...html > upload to your server and make an http-request.

But not all the chars are prompted from your PC-keyboard for example ÷ , the symbol from-to (from 1 to 5) [1÷5] , it's not available on my keyboard, neverthless I could let you read it ...I just typed in the source code : &#247; which is its ASCII value

Here is a dynamic list of ASCII values ASCII

The euro symbol is another example : € [&#128;]
Some chars have particular properties such as "<" & ">" ... in particular "<" , if not followed by a space the browser will consider it as an openig html-tag.
...HERE IS HOWTO escape the ASCII string :
Just replace in the source code the first "&" of the ASCII string with &amp;

To get the euro ASCII in html we will put in Notepad :  &amp;#128;
...if you want to get here [as html-output] : &#128;

Top  Web  JavaScript  Comments 




Lesson 2 [ . . . JavaScript ]

In all operating system for PC is contained a software-support to manage JavaScript , that is a programming language. To call this feature into action you will need to set into your html code section of your file the following TAGS.
The proprietary syntax for JavaScript is outlined in red :
<script language=javascript>
<!-- Result of this code is also in this separated file named as javascript.htm
// This is a comment extended over one line [...above link is another comment]
/*Here starts a multilines' comment.
   Comments are notes that the programmer sets to recall or give himself, [or to others]
   ... informations about his coding for a further usage-guidance.
Here ends the multiline comment.*/
var VAR="I am the <b>JavaScript</b>'s INTERPRETER <b>:-)</b>";
document.write(VAR,'<blockquote>...</blockquote>');
//This is the place for another single line comment-->
</script>
The above script outputs the following blue bordered result : 
Top  Web  Escape  Comments 




Lesson 2.1 . . . html & JavaScript COMMENTS

<!script language=javascript>
<!--To hide an entire JavaScript just set an exclamation CHAR as highlighted in red herein
// Comment line - LIMITATION : DO NOT USE PC's Enter KEY
//...this can be a very long text, although it's not advisable to make long comments of this kind.

/*START
...NO LIMITATION Enter KEY CAN BE USED
END OF A MULTILINE COMMENT
*/
var VAR="I am the JavaScript's INTERPRETER :-)";
document.write(VAR,'<blockquote>...</blockquote>');
//This can be another single line comment NO Enter KEY-->
</script>
To comment any html-TAG ...just set an exclamation mark [also in the closing tag] :
For example : <!font color=red>Commento di un TAG</font> will write : Commento di un TAG
...if till that point the color was green, as the closing TAG is not commented the color of the text [green] will be denied :
This is green and this is red and this is again green
SOURCE : <font color=green>This is green and <font color=red>this is red</font> and this is again green</font>
This is green and this is red and this is again green [...error] [rectify]
SOURCE : <font color=green>This is green and <!font color=red>this is red</font> and this is again green</font>
...This also show that some tags can be nested in their own name
The exclamation mark invalidates opening and closing TAGS and can be used as a sole standby <!COMMENT> ... no need to be closed.
The following TAGS can hide any html and JavaScript in the page :
<noscript> ... </noscript>
Top  Web  Escape  JavaScript