hi!
i have a simple problem with multiple forms. i want to pass variables from one form to another and then send all that to e-mail. i don't want to use cookies. so the only way to do that is with sessions, right?
i dont know nothing about sessions so i have found very simple tutorial on phpfreaks and i started to code but it wont work!
this is 1st page:
<FORM METHOD="POST" ACTION="page2.php">
Enter your Name: <input type="text" name="name">
<input type="SUBMIT" value="Submit">
</FORM>
and this is second:
<?php
session_start();
header("Cache-control: private");
echo "<strong>Step 2 - Register Session </strong><br />";
session_register('name');
$_SESSION['name'] = $_POST['name'];
?>
Welcome to my website <strong><? echo $_SESSION['name']; ?></strong>!<br />
Let's see what happens on the <a href="page3.php">next page.</a><br /><br />
when i type 'marek' for my name all i get on second page is:
Step 2 - Register Session
Welcome to my website !
Let's see what happens on the next page.
🙁
why is this happening? this is very simple but i really cant figure out whats wrong! im new in this session thing and maybe im doing something very stupid, so please help!
i have to pass variables to several different pages but if i cant figure out this simple problem then i will not be able to do complicated things.