This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset='UTF-8'> | |
<title>CSV to HTML5 Table Example </title> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" | |
integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous" /> | |
<style> | |
body { | |
margin: 20px auto; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset='UTF-8'> | |
<title>CSV to HTML5 Table Example </title> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" | |
integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous" /> | |
<style> | |
body { | |
margin: 20px auto; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Survey (CSV to HTML) example</title> | |
<meta name="description" content="it workshop 4 - answer"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/pure/2.0.3/pure-min.css"> | |
<style> | |
body { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$fh = fopen("survey.csv", "r"); | |
$header = TRUE; | |
echo '<table>'; | |
while (!feof($fh)) { | |
$rec = fgetcsv($fh); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# open the file ready for append | |
$fh = fopen("survey.csv", "a"); | |
# append $_POST global to file | |
fputcsv($fh, $_POST); | |
# close the file | |
fclose($fh); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>HTML5 Form Example </title> | |
<style> | |
body { | |
margin: 20px auto; | |
font-family: Helvetica, sans-serif; | |
font-weight: 400; | |
font-size: 1.25rem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<books> | |
<book isbn-13="9780192804778" isbn-10="0192804774"> | |
<title>Anarchism: A Very Short Introduction</title> | |
<author>Ward, Colin</author> | |
<class>anarchism</class> | |
<class>ethics</class> | |
<class>politics</class> | |
<price currency="GBP"> | |
<rrp>7.99</rrp> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<books> | |
<book isbn-13="9780192804778" isbn-10="0192804774"> | |
<title>Anarchism: A Very Short Introduction</title> | |
<author>Ward, Colin</author> | |
<classification class="anarchism, philosophy, ethics, | |
politics, social theory, libertarianism" /> | |
<price currency="GBP"> | |
<rrp>7.99</rrp> | |
<price>5.99</price> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:output method="html" version="5.0" | |
encoding="UTF-8" indent="yes"/> | |
<xsl:variable name="space"> | |
<xsl:text> </xsl:text> | |
</xsl:variable> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<patient nhs-no="7503557856"> | |
<name> | |
<first>Joseph</first> | |
<middle>Michael</middle> | |
<last>Bloggs</last> | |
<previous/> | |
<preferred>Joe</preferred> | |
<title>Mr</title> | |
</name> |