bernie.nmsu Posted September 16, 2004 Share Posted September 16, 2004 I have a form which contains two radio buttons to run a report. The radio buttons are called selection. Based on the user selection, the value becomes dept or date. I want to change the action of the form based on the selection. I am attempting the following if statement which fails. <form name="form1" method="post" <?php if ('selection' == "Dept") { action="classRosterReportDept.php" } else { action="classRosterReportDate.php" } ?> > Can someone let me know if Dreamweaver has something built in already to do this or on how to fix the php code. I receive the following error: Parse error: parse error, unexpected '=' Link to comment https://forums.phpfreaks.com/topic/1964-changing-the-action-of-a-form/ Share on other sites More sharing options...
bernie.nmsu Posted September 16, 2004 Author Share Posted September 16, 2004 **SOLVED** Performing to change behaviors on the action on the selection of the radio buttons resolved the problem. Link to comment https://forums.phpfreaks.com/topic/1964-changing-the-action-of-a-form/#findComment-6404 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.