Ok, I've borrowed a nifty book and I've had soooo much trouble so far. Took a long time to get past the 'hello world' program -- apparently I can't use single quotes and '\n' -- I have to use double quotes in order to use '\n'.
Anyway, I'm now on the second example. Basically, there are 2 scripts. The first one takes user input and saves it as a variable to pass into another script. See the following...
Someone please help. I'm sooo frustrated! I'm thinking I have something setup wrong somewhere or maybe I have a bad book -- yeah that's it. I have a bad book.
Script 1:
<html>
<head>
<title>Who Are You?</title>
</head>
<body>
<form action="you_are.php">
Please enter your name:<br>
I am...
<?php
print('<input type="text" name="person" value="' . $person . '"size="15">');
?>
<input type="submit" value="Go!" size="15">
</form>
</body>
</html>
Script 2:
<html>
<head>
<title>You Are! ...</title>
</head>
<body>
<?php
print('Well, hello ' . $person . ', nice to meet you!');
print('<br>');
print('<a href="who_are_you.php?person=' . urlencode($person) . '">Back to Who Are You?</a>');
?>
</body>
</html>
I've tried to use $_POST['person'] and that didn't work either...
Thanks!
Lori