POST question
| From: | Mike Tuller | Date: | Sat, 20 Jul 2002 05:39:57 +0000 |
| Subject: | POST question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-108618@lists.php.net to get a copy of this message | ||
I have a page with a form that has a drop down menu that I can select
different items that I want to display on another page where I can add more
information to be entered into a database. I can do that by using this on
the page that displays.
while ($row = mysql_fetch_array( $sql_result ))
{
$_POST["asset_type"] = $row["asset_type"];
}
What I want to do is have a different page display for different choices. So
if I choose one type of asset to add, then submit it to be added to the
database, I want to have a script that reads what the selection was and
displays the page that matches the type of asset that matches it.
I think the best way to do this is to have the "$_POST["asset_type"]" go to
a second page that decides if $_POST["asset_type"] = "Computer" go to the
page for adding computer information, or if it equals "Printer" is goes to
the page for entering printer information. The question I have is how can I
make sure the $_POST["asset_type"] carries onto a third page and how do I
make it so that when a selection is made, it opens the correct third page?
I hope I explained this well enough to understand.
Thanks,
Mike