Web Technologies
Web Technologies
181 / 183
Web Technologies
Webserver 101
Check open ports: nmap localhost
Webserver on the VM is apache (very common) Database server on the VM is mysql (very common)
182 / 183
Web Technologies
Webserver 101
Standard files in /var/www/html cd /var/www/html
ls -la
Have small demo website (not on VM; code is on canvas) View in webbrower at (in my setup) http://vm-ics:demo/index.html
183 / 183
Web Technologies
PhP 101
A web form is in page.html Will submit data to add.php add.php is a PhP script:
Mixed with html
Code between C/Java-like syntax
$ GET[] to access GET variables Similar for $ POST[]
184 / 183
Web Technologies
Javascript 101
Page using Javascript to check some form fields:
http://vm-ics:dome/pageJavascript.html
Checks fields client-side (not a good idea ¡¤¡¤¡¤)
185 / 183
Web Technologies
Databases 101
pageJavascript.html POSTs to resultsPass.php
Let¡¯s look into the DB:
sudo mysql
show databases;
show tables;
use webdemo;
select * from users;
186 / 183