Locked lesson.
About this lesson
Let's create the main skeleton of our Flashcard App.
Exercise files
Download this lesson’s related exercise files.
Creating The Index Page And Form.docx59.3 KB Creating The Index Page And Form - Solution.docx
59.9 KB
Quick reference
Creating the Index Page and Form
Let's create an index page and web form.
When to use
Do this to start our app.
Instructions
Our code so far...
<html>
<head>
<title>Math Flashcards!</title>
</head>
<body>
<center>
<h1>Addition</h1>
<h1>
<?php
$num1 = rand(1,10);
$num2 = rand(1,10);
echo $num1 . " + " . $num2;
?>
</h1>
<br/><br/><br/>
<form method="post" action="/">
Answer: <input name="answer"> <button>Submit</button> <button>New Card </button>
</form>
</center>
</body>
</html>
Hints & tips
- Create random numbers
- Create a form
Lesson notes are only available for subscribers.