my problem is: I am design a webbased registration system. I have three (more) pages in this site.
--- the first page is the login page,
--- the next page (upon login successed) is the function choice (say, to view personal information, to update personal information ..).
----the third page is the selected page based on the second page choice.
on the second page, buttons are linked to the designated pages. here are the codes on the second page:
- Code: Select all
<?php
session_start();
$user_id = $_POST['userid']; //userid passed from the login page
session_register($user_id);
echo "in the post: user_id: $user_id";// here the value is passed
$i=$_SESSION['user_id'];
echo "in the session user_id: $i";//here the value is passed
?>
<html>
<head> <title>Student User Interface</title> </head>
<body>
<table width="75%" border="1" cellspacing="20">
<tr>
<td>
<form action="student_pers_inf_view_page.php" method="post" name="form1" target="_parent">
<input type="submit" name="Submit" value="View Personal Information">
</form>
</td> //end of button one
.
.
.
the other buttons are the same as above, each button is an indepent form.
</body>
</html>
according to my imagination, after I push the view personal information button, the information should be display in the third page. but the problem is that the userid can't be passed from page two to the third one.
I tried to trace the passing of the userid from page one to page three. only page two can receive the userid with either the _SESSION or the _POST method. but not the third page.
Can anybody tell me what I should do?
by the way, in the third page, I used the _SESSION['userid'] to try to extract the value. but it doesn't work,
:roll: :x
Thaks for your help!!
john

