# Php form submits to different urls depending on what checkbox is selected

**URL:** <https://forum.kirupa.com/t/php-form-submits-to-different-urls-depending-on-what-checkbox-is-selected/316839>\
**Category:** Uncategorized\
**Created:** [December 3, 2010, 5:28pm UTC](https://forum.kirupa.com/t/php-form-submits-to-different-urls-depending-on-what-checkbox-is-selected/316839 "2010-12-03T17:28:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![irishcash33](https://avatars.discourse-cdn.com/v4/letter/i/958977/32.png) [@irishcash33](https://forum.kirupa.com/u/irishcash33)\
**Post date:** [December 3, 2010, 5:28pm UTC](https://forum.kirupa.com/t/php-form-submits-to-different-urls-depending-on-what-checkbox-is-selected/316839/1 "2010-12-03T17:28:43Z")

</div>

Hi,  
I have searched everywhere and tried a few things with no luck.  
I have a php form part of wordpress. I have the form submitting to wordpress and another user management system.

I want 3 checkboxes and depending which is checked, on submit the form data will go to a separate url.

I have this so far

```php
<?php if ($_POST["checkbox"] == "Banking")
{
onsubmit="multiSubmit(this, 'url1');"
}
if ($_POST["checkbox"] == "Insurance")
{
onsubmit="multiSubmit(this, 'url2');"
} 
if ($_POST["checkbox"] == "Securities")
{
onsubmit="multiSubmit(this, 'url3');"
} 
?>

```

If i didn’t do the multiSubmit, the form would only go to wordpress. Right now with that code, I get an error. Any suggestions on why or better solution to how to do this?

Thanks
