“一旦产生了财富,如果他们返回网站,他们应该从产生之日起显示他们明年的现有财富。
如果用户想创造新的财富,请给他们一个链接。”
我的问题是我不知道如何让它在返回网站时留在生成的财富页面上,我尝试搜索它但我没有找到任何东西。我想我已经做了一个重置链接,但我不确定。我需要什么样的代码才能让它留在财富页面?
我在网上搜索它,我试过以某种方式检查是否应用了 cookie,但我们没有被教过。
PHP 主页面 (index.php)
<html>
<head>
<meta charset="utf-8">
<title>Week 4 Tutorial - Fortune Teller</title>
</head>
<body>
<img src="fortune-teller.jpg" alt="The Fortune Teller" style="float:right;" />
<h1>Fortune Teller</h1>
<p>The fortune teller has looked deep in your soul, and has a sense of who you are and what will come in your life.</p>
<p>What is your fate? How long will you live? Will you be successful or struggle in life? Find out below...</p>
<form method="post" action="fortune.php">
<label for="fname">First Name</label>
<input type="text" id="fname" name="fname" />
<br />
<label for="colour">Favourite Colour</label>
<input type="text" id="colour" name="colour" />
<br />
<label for="birthmonth">Birth Month</label>
<select id="birthmonth" name="birthmonth">
<option value="1">January</option>
<option value="2">February</option>
<option value="3">March</option>
<option value="4">April</option>
<option value="5">May</option>
<option value="6">June</option>
<option value="7">July</option>
<option value="8">August</option>
<option value="9">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>
</select>
<br />
<input type="submit" id="submit" name="submit" value="Tell my fortune" />
</form>
</body>
</html>
慕婉清6462132