I just start to play around with php few days ago. I managed to try some samples like passing variables (from a form page to a process page) and it works. But don't know why when I tried again just now, it didn't work. It manage to direct to the process page but can't see the variable I submited in form page. What is the possible problem here? Thanks.
This is the form page:
<html>
<body>
<form action="pass_var.php" method="POST">
Your first name <input type="text" name="name">
Your favorite color <input type="text" name="color">
<input type="submit" value="Send Info">
</form>
</body>
</html>
Below is the process page:
<html>
<body>
Hello <?php print $_POST["name"]; ?>,
Your favorite color is <?php print $_POST["color"]; ?>.
</body>
</html>if u r using php version < 4.1, u have to use $HTTP_POST_VARS["color"] to access the variable.
This is the form page:
<html>
<body>
<form action="pass_var.php" method="POST">
Your first name <input type="text" name="name">
Your favorite color <input type="text" name="color">
<input type="submit" value="Send Info">
</form>
</body>
</html>
Below is the process page:
<html>
<body>
Hello <?php print $_POST["name"]; ?>,
Your favorite color is <?php print $_POST["color"]; ?>.
</body>
</html>if u r using php version < 4.1, u have to use $HTTP_POST_VARS["color"] to access the variable.