jlw12689 wrote:
> second page
>
> <?php
> // script2.php
> session_start();
> echo('Hello, ' . $_SESSION['name1']);
> ?>
You need to set the session variable first.
<?php
session_start();
if (isset($_POST['name1'])) $_SESSION['name1'] =
$_POST['name1'];
echo 'Hello, ' . $_SESSION['name1'];
?>
By the way, using echo to create your form on page one is a
complete
waste of time. Just use an ordinary HTML form - a lot less
typing, and a
lot more efficient.
--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/