I have code from a book! and I can't get the server to display the details. There must be something tiny wrong. Can someone comment.
I start off with about_you.htm page
<body>
<h2>Please tell us a little bit about yourself</h2>
<form action="generate_links.php" method="get">
<h3>Contact Information</h3>
First Name: <input type="text" name="f_name"><br>
Last Name: <input type="text" name="l_name"><br>
Home Phone: <input type="text" name="phone"><br>
SSN: <input type="text" name="ssn"><br>
<h3>Employment Info:</h3>
Company Name: <input type="text" name="c_name"><br>
Work Phone: <input type="text" name="w_phone"><br>
Title: <input type="text" name="title"></p>
<h3>Hobbies</h3>
What is your favourite hobby?
<p>Skiing <input type="radio" name="hobby" value="skiing"><br>
Rollerblading <input type="radio" name="hobby" value="roller"><br>
Chess <input type="radio" name="hobby" value="chess"></p>
<p><input type="submit" name="submit" value="submit"><input type="reset"></p>
</form>
</body>
</html>
which goes to generate_links.php
<h2>Links generated based on user input</h2>
<?php
print("<p><a href=\"user.php?f_name=$f_name&l_name=$l_name&phone=$phone&w_phone=$w_phone&ssn=$ssn\">");
print("Contact Info</a>");
print("<p><a href=\"user.php?c_name=$c_name&c_phone=$c_phone&title=$title&snn=$snn\">");
print("Work Info</a>");
print("<p><a href=\"user.php?f_name=$f_name&l_name=$l_name&hobby=$hobby\">");
print("Favourite Hobby</a>");
?>
</body>
</html>
all is fine and displays this correctly then you click an option and user.php pops up.
<ul>
<li>First Name: <strong><? print $f_name ?></strong></li>
<li>Last Name: <strong><? print $l_name ?></strong></li>
<li>Home Phone: <strong><? print $phone ?></strong></li>
<li>SSN: <strong><? print $ssn ?></strong></li>
<li>Company Name: <strong><? print $c_name ?></strong></li>
<li>Work Phone: <strong><? print $w_phone ?></strong></li>
<li>Title: <strong><? print $title ?></strong></li>
<li>Favourite Hobby: <strong><? print $hobby ?></strong></li>
</ul>
</body>
</html>
which is also fine in displaying the html part but I don't get any feedback from the server. In other words $f_name $l_name don't display. The really strange part is in the address field I can actually see info sitting there so it is passing something just not displaying.
Any ideas, clues, hint?
Much appreciated.😕