Thank you devinemke. It works.
PHP session is the biggest problem for me as a newbie :-) Your answer starting to open my mind.
I've tried to do some modification with the source you sent.
<?php
session_start();
if (isset($_POST['lang'])) {
$_SESSION['lang'] = $_POST['lang'];
} else {
$_SESSION['lang'] = 'PHP';
}
?>
Link:
<a href="?type=procedural&<?php echo strip_tags(SID) ?>">Procedural Language</a>
<a href="?type=objectoriented&<?php echo strip_tags(SID) ?>">Object Oriented Language</a>
<form action="" method="post">
Prog Language: <input type="text" name="lang" value="<?php echo $_SESSION['lang']; ?>">
<input type="submit" value="Send">
</form>
I tried to input C++ into the <input> field and then pressing enter. After that, I click one of the link (Procedural Language). But, the value of the input box back to 'PHP'. I wondering why this can happen. Do you have any idea how to make the value of the <input> field don't change eventhough I click the link?
Thank you.