Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 5999 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I need some help to write an if statement. I have 2 checkboxes with same values but different field name I am wonder how do I write a if statement to compare the two checkbox if the value check are the same then I skip to another page otherwise I keep at the same page. Any help will be appreciated.

Posted

Checkbox values are stored as text, so if you're doing a simple check in a script, you could use:


If [table::checkbox1 = table::checkbox2]

Go to Layout [layoutname]

...

Else

... Do this ...

Posted

is this in reference to PHP? is this a FORM and you want to branch based upon field1=field2? if this is a FORM, do you want to branch after submit, or use an AJAX to display different parts of a page based on the match?

Posted

yes it is in reference to a php.

What am I trying to do is to compare if the the value ckecked on checkbox are the same as the value checked on checkbox 2. If in case they are the same they should go to page1.php, And if in case they are not equal they should go to another page2.php

Any help will be appreciated.

thank you

  • 3 weeks later...
Posted

yes it is in reference to a php.

What am I trying to do is to compare if the the value ckecked on checkbox are the same as the value checked on checkbox 2. If in case they are the same they should go to page1.php, And if in case they are not equal they should go to another page2.php

Any help will be appreciated.

thank you

Create a third page and have your form submit to IT. Test for equal and branch as needed. Use 'header()' to redirect to the proper page. WARNING: do not introduce any whitespace into the page (that is not inside the "<?php ... ?>"). Or your header() will not work. PHP will think you have pushed the whitespace to the browser and issue a 'header already sent' message (or something like that!)

This topic is 5999 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.