jeff5656 Posted August 13, 2009 Share Posted August 13, 2009 Ok I have this form: <form name="delete_record" method="post" action="delete_bundle.php"> Now how do I do it so the action goes to a certain section of delete_bundle.php? In other words can it be something like action=delete_bundle.php?$id=hello and then have in the processing form: switch case: get['id'] does this work with a submit button? Thanks! Link to comment https://forums.phpfreaks.com/topic/170147-form-button-that-goes-to-a-certain-part-of-the-processing-page/ Share on other sites More sharing options...
jake2891 Posted August 13, 2009 Share Posted August 13, 2009 you can do it that way. for example on your page you could have some php code that determines the action like so. <?php if($foo == 'bar'){ $action = 'delete_bundle.php?id=1' } ?> <form name="delete_record" method="post" action="<?php echo $action; ?>"> then on delete_bundle.php you would have this <?php switch ($_REQUEST['id']){ case "1": // something break; } ?> Link to comment https://forums.phpfreaks.com/topic/170147-form-button-that-goes-to-a-certain-part-of-the-processing-page/#findComment-897568 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.