CincoPistolero Posted June 13, 2009 Share Posted June 13, 2009 I have a page that loads form order data from several database tables. From that page, i'd like to do two different things. 1) send form info to a page that deactivates order 2) send form info to a page that adds everything selected to a work order table. I've tried the code below to send to different pages but the location.replace does not pass the form data. <?php if (isset($_POST['deact'])) { // if form has been submitted ?> <script language='javascript'> location.replace('deactivate.php?artistID=<?php echo $row['artistID']; ?>'); </script> <?php } else if(isset($_POST['accept'])) { ?> <script language='javascript'> location.replace('acceptSubmission.php?artistID=<?php echo $row['artistID']; ?>'); </script> <?php } else { ?> <div id="main"> How else is it possible to have two buttons that can act on all of the form data? thanks in advance Link to comment https://forums.phpfreaks.com/topic/162008-whats-the-best-way-to-handle-multiple-submit-buttons-on-forms/ Share on other sites More sharing options...
Psycho Posted June 14, 2009 Share Posted June 14, 2009 You should do this server-side, not client-side. Link to comment https://forums.phpfreaks.com/topic/162008-whats-the-best-way-to-handle-multiple-submit-buttons-on-forms/#findComment-855361 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.