Jump to content

changing the action of a form


Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.