gnawz Posted July 24, 2007 Share Posted July 24, 2007 these are my files reports.php $Report = $_GET['report']; switch ($Report) { case 'add' : addfunction(); break; case 'delete' : deletefunction(); break; case 'update' : updatefunction(); break; } the other file with my select... checkrpt.php <form name="frmUtils" method="post" action=""> <select name="Do" id ="Do"onChange="SwapReport();"> <option value="0">Select view</option> <option value="1">Add</option> <option value="2">Update</option> <option value="2">Delete</option> </select> </form> <script type="text/javascript"> function SwapReport() { if (document.frmUtils.Do.selectedIndex == 1) { document.frmUtils.action = "reports.php?report=add"; } else if (document.frmUtils.Do.selectedIndex == 2) { document.frmUtils.action = "reports.php?report=update"; } else (document.frmUtils.Do.selectedIndex == 3) { document.frmUtils.action = "reports.php?report=delete"; } } </script> Help from here. It is not working yet. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.