Back in about 1997, we were given 10MB of static webpages with BT Internet and three CGI scripts for a visits counter, guestbook, and form to email.
This has shaped my journey.
We needed a boat booking system for the sailing club. At the time there was a paper diary and you phoned the owner of the diary. http://www.dougrice.plus.com/
So we could learn about writing HTML and uploading the page over a dial-up modem at 56K.
Try and record what is simple and what is more complex.
What features require more complexity.
I have thought I need to write down for myself a path through the journey.
A web page written in pure HTML can be written using a simple text editor and opened using a Web Browser.
Learning HTML requires documentation which, at the time was in books from a bookshop.
I had dialup, but it used the phone line, needed a phone call and prevented incoming calls.
Images probably needed to be scanned from photos.
Microsoft provided Frontpage express, and website authors were using Dreamweaver
I could have a Website of static pages that could be updated using a dialup modem.
I could have a local copy on my PC
BT Internet did not allow user written CGI scripts.
I worked out that if the guestbook saved the data from form fields wrapped in JavaScript? Function calls, I could include the JavaScript? and process the data. This would save a lot of learning in the short turn.
Generic CGI script wraps Form data in gbF().
function gbF( name, email, postedOn, IPaddress, userfield1, userfield2, userfield3, userfield4, comments)
Include remote guestbook and gbF() will be called once per entry.
I could run Appache on my PC using fixed IP addresses.
https://imatix-legacy.github.io/xitami/25b4/
Web hostering was evolving
This was accessed using DialUp?, it was before CPANEL so you needed to find a tool to FTP your files to to the live server. As you were using a penny per minute dialup, it was best to not develop on the live server.
Always on broadband helped
Leaning HTML requires a lot of skills
A local copy of the website was used to develop and code it.
images would display if the URL was relative to the folder, but if the URL started with like src=/img it would not display.
Using subst w: . simplifies URL usage when opening .htm files saved from the server and opened off the desktop, if they include href=/js or src=/img
At the times Styles were inline and it was pre CSS.
A study of the HTML exported by Microsoft Word included a mass of bloat that hid the text viewed by the user.
It was before CSS and the HTML seemed to use P tags and SPAN tags and loads of styles .
Open this page and view source http://www.dougrice.plus.com/hp/logipic/ so see lots of inline styles.
http://www.dougrice.plus.com/btinternet/ this one was created with FrontPage? express and hand edited.
I am still looking for a tools that produced the minimum HTML for a nice looking page. This wiki helps.
CSS was another thing to learn. Amidst the mass of other worries, The syntax was lost on me
style=" color:red; " class=name needs .name id=name needs #name
Using HTML DIV tags with CSS was worth learning.
I started with Forms and used name= and associated JavaScript?
JavaScript? and Forms:-
// pict up the data from the assorted file and fill in the update form. var F1 = window.document.forms["F1"]
// This is picked up from a cookie F1.name.value = cookieA[ 'name' ] F1.email.value = cookieA[ 'email' ]
F1.userfield1.value = record.userfield1
JavaScript? and ID:-
id=
document.getElementById?( "label"+label );
JavaScript? on a webpage is a useful tool to try out programming ideas. It provided a workaround to running unapproved .exe files tools on my PC for work.
For a long time Web browsers were limited and Java Applets provided functionality.
Using Dial up means Client Side is simpler.
Serverside needs a Webserver. I could run one on my home PC
Now I can use PHP -S to start up a local web server
Early on you could use frames to to form the panels of a web page. Frame have been depreciated.
So you could have a title and links panel, and a panel for each subject page.
HTML does not support Client Side includes, where you can include blocks of HTML. I used JavaScript? for this.
JavaScript? could be used for writting HTML and outputting it as the page was loaded.
Later on InnerHTML? allowed bits of a webpage to be updated.
You could write CGI scripts using Perl and PHP.
Running a local server on my PC helped as access to error log files is quite difficult on remote servers.
Every web server seems to put the webpages in a different place.
Learning and remembering the syntax for appending variables in PERL, PHP, ASP, JAVASCRIPT, AWK , C adds complexity
There is a need to tabulate all of this.
PHP allows Server Side include files so it would be possble to write pages that have standard headers.
You can convert an HTML file to PHP by changing the extension, but you then need to run it from the webserver.
BT Internet did not allow user PHP scripts.
I could write CGI scripts in Perl, but not on BT Internet.
Plusnet provided a CGI server.
You could PHP and CGI on the CGI server.
PHP -S now starts a development server from a folder on my desktop.
A web page using frames could load multiple HTM files and update the subject and provide client side global variables, which are a security risk.
| title banner |
| menu panel |
| subject panel |
| footer panel |
HTML webpages cannot do Client side include for HTML, but can include JavaScript? to output the same HTML on multiple pages.
JavaScript? now supports multi-line strings so the code is closer to the HTML layout.
I could have used the dos copy command to regenerate wmPage.htm which could be copied up to the website using FTP.
copy /A /Y wpHeader.htm + wpSubject1.htm + wpfooter.htm wmPage1.htm copy /A /Y wpHeader.htm + wpSubject2.htm + wpfooter.htm wmPage2.htm copy /A /Y wpHeader.htm + wpSubject3.htm + wpfooter.htm wmPage3.htm
Or an awk script to split up wmPage1.htm into separate files.
PHP and PERL allow multi-line strings. These strings can expand variables.
PHP and PERL supports server side include, so that common HTML can be used on multiple pages.
http://ccgi.dougrice.plus.com/cgi-bin/gbtxt2.pl
source:
http://ccgi.dougrice.plus.com/gbtxt2.pl.txt
http://ccgi.dougrice.plus.com/gbtxtInclude.pl.txt
CSS can be used to position text into columns and panels. On the sailing club website the right hand side panel was done using inline styles,
I tried to understand this in http://ccgi.dougrice.plus.com/sampler.htm
Some websites allow a cron job to do backups.
Use view source on this webpage: http://www.dougrice.plus.com/hp/logipic/ and you see it uses div with absolute position, meaning you need to use the software to edit it.
A web page can be opened by:
So the flow for a generic page using PHP could be:-
| open session |
| GET? - process query string and process $_REQUEST or $_GET |
| POST? - read stdin and process $_REQUEST or $_POST |
| include header |
| based on GET or POST prepare data to be displayed |
| if form data make it safe and update database |
| query database and prepare data for display |
| There could be multiple database queries |
| emit subject panel |
| include footer panel |
It is worth having a simple web page that opens a page using hypertext link and or a form to allow what is available in $_SERVER to be understood for each way the script is opened.
PHP code:-
if ( isset( $_SERVER['QUERY_STRING'] ) ){
if ( $_SERVER['QUERY_STRING'] == 'lock' ){
}
echo("- dump available data - ");
foreach ($_SERVER as $x => $y) {
echo( "$x : $y ".$CRLF );
}
echo("- dump available data from GET or POST - ");
foreach ($_REQUEST as $x => $y) {
echo( "$x : $y ".$CRLF );
}
A php script can call system calls to get directory listing and process lists, etc and the script may need to sleep so the response to the request is available.
The available settings in $_SERVER are different depending if the PHP script is opened by Hypertext Link, or Form action
PHP
// dump fields $a = print_r( $_REQUEST , true ); $a = print_r( $_SERVER , true ); echo( "< pre >" ); echo $a; echo( "< /pre >" );
echo( "< pre >" ); print_r( $_REQUEST , true ); echo( "< /pre >" ); echo( "< pre >" ); print_r( $_SERVER , true ); echo( "< /pre >" );
The available information in $_SERVER depends on the way the script is opened.
I am still struggling to understand font sizes on Websites on mobiles.
Mobile