Group session July 1st


Here’s a supplemental video to reinforce the ideas for these first exercises.

A utility function
function formatCode($code) {
	echo "<code class='show-code'>";
		echo '<pre>';
		echo '</pre>';
	echo '</code>';

This will be helpful!

	/* initializing the data */
	$name = "Bobbo head";

	/* handing user input */
	$formSubmitted = isset($_POST["submitted"]);

	if ($formSubmitted) {
		$name = $_POST["firstName"];

	/* calculations */
	$greeting = "Hello, $name, nice to meet you!";

<form method='POST'>

		<label for="fn">What is your first name?</label>
		<input id="fn" type="text" name="firstName">

	<button type="submit" name="submitted">Submit</button>


	<!-- feedback -->

There are a few loose ends to tie up here…

Do you know what they might be? Have you tried it out in all of the scenarios that might happen?

Group session July 1st