Jump to content


Photo

changing the action of a form


  • Please log in to reply
1 reply to this topic

#1 bernie.nmsu

bernie.nmsu
  • Members
  • PipPip
  • Member
  • 22 posts

Posted 16 September 2004 - 09:47 PM

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 '='

#2 bernie.nmsu

bernie.nmsu
  • Members
  • PipPip
  • Member
  • 22 posts

Posted 16 September 2004 - 10:21 PM

**SOLVED**
Performing to change behaviors on the action on the selection of the radio buttons resolved the problem.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users